[wp-trac] [WordPress Trac] #39519: Twenty Seventeen: Excerpt not showing
WordPress Trac
noreply at wordpress.org
Mon May 8 21:42:01 UTC 2017
#39519: Twenty Seventeen: Excerpt not showing
-----------------------------+-------------------------
Reporter: Sheriziya | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Bundled Theme | Version: 4.7
Severity: normal | Resolution: worksforme
Keywords: has-screenshots | Focuses:
-----------------------------+-------------------------
Comment (by cavalierlife):
This is one of those kinds of decisions that baffles me. In any case, the
code located at http://www.blogmynotes.com/display-post-excerpt-twenty-
seventeen-wordpress-theme/ works well, though make sure you upload
template-parts/post/content.php to your child theme (including the folder,
subfolder, and file) - don't overwrite the parent theme as that post
suggests to do. Just in case that post gets deleted, here are the
instructions.
Duplicate the content.php file in template-parts/post/ and then replace
the entry-content div with the following.
{{{
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
if ( is_single() ) :
the_content( sprintf(
__( 'Continue reading<span class="screen-
reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
) );
wp_link_pages( array(
'before' => '<div class="page-
links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
'link_before' => '<span class="page-
number">',
'link_after' => '</span>',
) );
else:
the_excerpt( sprintf(
__( 'Continue reading<span class="screen-
reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
) );
wp_link_pages( array(
'before' => '<div class="page-
links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
'link_before' => '<span class="page-
number">',
'link_after' => '</span>',
) );
endif;
?>
</div><!-- .entry-content -->
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39519#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list