• I upgraded WordPress and the theme changed the posts layout. I only get excerpts.

    How do I stop the excerpts and get full posts?

    Is the code to change here? If so, what do I change it to?

    <div class=”entry-content post-content”>
    <?php if (has_excerpt()) {
    the_excerpt();
    } else {
    echo newswire_excerpt(20);
    } ?>
    </div><!– .entry-content –>

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Looks like it. The if-else block checks whether your posts have excerpt, i.e. when you add a post whether you have an additional excerpt box to fill in beside the main content editor. If yes, it outputs the_excerpt(), otherwise a custom function newswire_excerpt() is invoked which is supposed to create a summary of your main content (most likely written in theme’e functions.php file) and display it on screen.

    If you want to pull the whole content rather than displaying an excerpt, you can get rid of that if-else block and simply use the following:

    
    <div class=”entry-content post-content”>
       <?php the_content(); ?>
    </div><!– .entry-content –>
    

    Hope this works for you.

    Thread Starter Dr. Nellie Deutsch

    (@nelliemuller)

    Thank you. The trouble is the full post doesn’t appear. How do I get it to appear say with for more or continue reading…

    Do you have excerpt enabled in your posts? If so, you can disable it first and just put content in your editor. At this point if you just print <?php the_excerpt(); ?> it will display a default paragraph of your actual content with a more link appearing next to it, which would lead your users to the actual post page.

    Thread Starter Dr. Nellie Deutsch

    (@nelliemuller)

    I added what you suggested but it didn’t work so I resorted to what was and not my site if off.

    Ok. I am not sure if you are talking about homepage. However, I just installed the theme and set front page to display “Latest Posts”. Here is a screenshot of what I see at my end. The posts are coming inside slider with “Read more” link as well as the post summaries below the slider also are coming in trimmed version with title linked to the main post page where the entire content is being displayed as usual.

    Screenshot: https://prnt.sc/el4a7x

    NB: I did not make any change anywhere in code.

    You may not require all these anymore but just putting here in case it helps.

    Thank you!

    Thread Starter Dr. Nellie Deutsch

    (@nelliemuller)

    Yes, but that’s because I restored a backup from March 12. There was no other way. I suggest everyone backup their wordpress sites on a daily basis because upgrading plugins may cause problems with certain themes.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Stop Excerpt and Get Full Post’ is closed to new replies.