Single.php | Categories not displaying correctly
-
I’ve created three categories: Current Exhibits, Upcoming Exhibits, Past Exhibits. The three categories are displayed on the homepage using POSTS: http://www.galleryat1300.com
When clicking Learn More from the Current Exhibit section, you are directed to the correct Single.php page, HOWEVER, the category content displayed is incorrect. Single.php is displaying the category ‘About’, instead of the ‘Current Exhibit’ content:
http://www.galleryat1300.com/collecting-my-thoughts/Single.php
<div id="single"> <div id="single-left"> <?php if ( has_post_thumbnail()) : ?> <?php the_post_thumbnail(); ?> <?php endif; ?> </div> <div id="single-right"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <h1><?php the_title(); ?></h1> <?php the_content(); ?> <?php endwhile; endif; ?> <?php wp_reset_query(); ?> </div> <div class="cf"></div> </div>I would like Single.php to automatically display the correct Post content of a category.
For example, when on the homepage you click “Learn More” about the Current Exhibit, then Single.php displays the Current Exhibit post content. If you click “Upcoming Exhibit”, Single.php displays the content from “Upcoming Exhibit” Post Category.Thank you for your help.
The topic ‘Single.php | Categories not displaying correctly’ is closed to new replies.