Public Ticket #1141494
Only only show excerpt on blog


  •  1
    Joeri started the conversation

    Hi there,

    How can I only show the excerpt of posts on the blog page? We have a huge amount of posts and our previous theme automatically was set to only show the excerpt. Adding a "more tag" to all posts is no ideal solution.

  •  37
    Support replied

    Hi, I'm assuming you want an automatically generated excerpt. Like the first 55 words from your post. This kind of functionality is currently not available as a theme option but you can add it manually. 

    Open the template file where you want to show the excerpt.

    Find the following code:

    <?php the_content(); ?>

    And replace it with:

    <?php the_excerpt(); ?>

    We will add this as theme option with the next update.

    Regards, Support Team

  •  1
    Joeri replied

    In which template file can I change the code? It's not in archive.php, index.php or single.php... There's only this code that looks like it in 

    <div class="entry-content">
                /* translators: %s: Name of current post. */
                wp_kses(__('Continue reading %s <span class="meta-nav">→</span>', 'leadinjection'), array('span' => array('class' => array()))),
                the_title('<span class="screen-reader-text">"', '"</span>', false)

  •  37
    Support replied

    To display only the excerpt at blog post listing page, you need to edit the "content.php" file. It is inside the "template-parts" folder.

    We recommend making this changes with the child theme. Because if you use the main theme, all your changes will be lost, if you update it.

    Regards, Support Team