I know how to add the more-link in the post editor to show the excerpt of post instead of the full post. In this method excerpts created automatically.

If I want to manually enter the excerpt I have to use the field excerpt (after showing it from screen options). I expected excerpt will be shown on front page like the method above, but instead the excerpt is shown over the full post, both are displayed !!

I need the manual excerpt (like in method 2) but to display only the excerpt on the front page without the full post.

How to achieve that (without coding if possible) for the end-user?

Notes:
* I’m using the latest version of WP (4.4.2).
* Theme used is “Twenty Sixteen”.
* Default plugins only are installed.

5 Answers
5

You can use has_excerpt() for this, which checks whether the post has a manually set excerpt. The sample code below uses this function:

<?php if ( has_excerpt() ) : // Only show custom excerpts not autoexcerpts ?>
    <span class="entry-subtitle"><?php echo get_the_excerpt(); ?></span>
<?php endif; ?>

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *