• Hey Everyone,
    I am using Twenty Seventeen Theme for my site, in my blog page the post are showing the full content not the summary of it.

    In the setting i have set it summary still unable to do so.

    Settings -> Reading -> For each article in a feed, show Summary

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello rajkarn1009,

    You will need to edit the content.php file of the Twenty Seventeen Theme to show excerpt instead of the full content posts.

    Thread Starter rajkarn1009

    (@rajkarn1009)

    what should i update in content.php ? can you help me out? i dont have much technical knowledge.

    You can find the content.php file in the location below

    /wp-content/themes/twentyseventeen/template-parts/post/

    Look for this code in the content.php file

    <div class=”entry-content”>
    <?php
    /* translators: %s: Name of current post */
    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>’,
    ) );
    ?>
    </div><!– .entry-content –>

    REPLACE THE CODE ABOVE WITH:

    <div class=”entry-content”>
    <?php
    if ( is_single() ) :
    /* translators: %s: Name of current post */
    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 –>

    Thread Starter rajkarn1009

    (@rajkarn1009)

    The changes are not working, its showing an error in the syntax and also after updating the content.php my blog page shows error message the site is experiencing some issue

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Blog Page showing full Post’ is closed to new replies.