Home › Forums › Support › Show post excerpt on single post This topic has 8 replies, 1 voice, and was last updated 3 years, 1 month ago by PJ. Viewing 9 posts - 1 through 9 (of 9 total) Author Posts July 30, 2018 at 3:30 am #635829 Manish Is there any way to show post excerpts on the single post, like below the featured image and before the article begins? July 30, 2018 at 7:19 am #635987 DavidStaff Customer Support Hi there, are you using the Excerpt meta in the WP editor? If so where would you want these to be displayed on the single post? July 30, 2018 at 7:27 am #636000 Manish Yes, using the excerpt meta in wp editor. Ideally I would like the excerpts to appear just below the featured image on a single page. It helps the readers to get an excerpt or summary before the main content begins. July 30, 2018 at 8:10 am #636124 DavidStaff Customer Support OK, we could add this function: add_action('generate_before_entry_title', 'db_single_post_excerpt'); function db_single_post_excerpt() { if ( is_single() && has_excerpt() ) { $single_excerpt = apply_filters('the_excerpt', get_post_field('post_excerpt', $post_id)); echo '<div class="single-excerpt">' . $single_excerpt . '</div>'; } } https://docs.generatepress.com/article/adding-php/ You can then style it with the single-excerpt CSS Class July 30, 2018 at 8:54 pm #636612 Manish Ok. That puts it above title. I need it after the featured image. Unfortunately you don’t have a hook generate_before_entry_content sorely needed. July 31, 2018 at 2:35 am #636767 DavidStaff Customer Support Ah ok, try: generate_after_entry_header You may find this useful: https://docs.generatepress.com/article/hooks-visual-guide/ July 31, 2018 at 2:52 am #636778 Manish Yes, ideally it should work but for some reasons the output of this is coming where the output of generate_after_entry_title should come, i.e, before the featured image instead of after. Please check if the hook code is correct. July 31, 2018 at 3:06 am #636784 DavidStaff Customer Support OK, try adjusting the priority by changing the add_action like so: add_action('generate_after_entry_header', 'db_single_post_excerpt', 30); March 10, 2021 at 2:54 am #1689306 PJ I had the same problem so changed it to generate_after_entry_title which puts it under the title. Author Posts Viewing 9 posts - 1 through 9 (of 9 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In