• Resolved smackayht

    (@smackayht)


    Hey, After the recent WordPress update I have noticed a problem with the_excerpt on the homepage. After the except code nothing works. It’s like it reset the loop as seen in the image below, the url is reset.

    <div class="category-content">
    <!-- #post-<?php echo get_permalink( $post->ID ); ?> -->
    	<?php
    	the_excerpt();
    	?>
    <!-- #post-<?php echo get_permalink( $post->ID ); ?> -->
    </div>

    Image Link with source
    HTML Source

    Any ideas? Works perfectly fine on the News Category page

    • This topic was modified 3 years, 3 months ago by smackayht.
Viewing 7 replies - 1 through 7 (of 7 total)
  • consider using get_the_ID() to get the current post id inside the loop instead of using $post->ID

    Thread Starter smackayht

    (@smackayht)

    I have tried many things after the_excerpt code and nothing works.
    If I remove the excerpt function everything starts working again.

    I am currently on my staging site and everything is working as expected on WP 5.8.
    I am trying to now see if upgrading to 5.8.2 causes the problem or if it was a plugin update.

    • This reply was modified 3 years, 3 months ago by smackayht.

    Can you please share the full screenshot of your file?

    Thread Starter smackayht

    (@smackayht)

    Now I am really baffled. My staging env works perfectly with all the updates.

    Re-save the permalink on my website and check if the issue gets solved.

    Thread Starter smackayht

    (@smackayht)

    Tried that a few times, nothing.
    Now copying my production site back to staging to see if have the same problem.
    This is a tricky one.

    Thread Starter smackayht

    (@smackayht)

    This is a problem with one of my hosts settings. Not a WordPress or plugin problem.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘the_excerpt on HomePage not working’ is closed to new replies.