Incorrect search results in search.php – issue triggered by using `define(‘BodyID’, ‘search’); the_post();` in search.php

You should call the_post only inside the loop, or call rewind_posts() before actually starting the loop. sidenote: you are doing it totally wrong. don’t reinvent the wheel, look in the codex how to write a theme or use one of the bundled default themes as a base to your theme. No sane person starts to … Read more

Single Featured Image Repeating

This is wrong <?php if ( have_posts() ) { while ( have_posts() ) { if ( has_post_thumbnail() ) { echo “<div id=’post_thumbnail’>”; the_post_thumbnail(); echo ‘<h4>’ . get_post(get_post_thumbnail_id())->post_excerpt . ‘</h4>’; echo “</div>”; } the_post(); You are calling your thumbnail before the_post(). Just move the_post() to before if ( has_post_thumbnail() ) {