2 Different Category Issues
-
Good day all;
I am working on a custom theme for my organization and have two issues with categories. These issues do not happen with the default theme, but seem to happen with my theme and I cannot figure out why as most of the code is exactly the same, I just wrapped a new header/footer around it and some custom php/sql code to pull the authors bio and photo from another database.
Issue #1:
If you visit this page : https://www.tdslaw.com/blogs/jeff_pniowsky/ you will notice that 3 out of the 4 posts show up as uncategorized, only the newest post has a category. All 4 posts are in categories.My index.php code:
<div id="bioSection"> <div class="spacer"> </div> <img class="authorPhoto" src="<?php echo $photoPath;?>" title="Photo of <?php bloginfo('name'); ?>" alt="Photo of <?php bloginfo('name'); ?>"/> <p class="bio"><?php echo $intro; ?></p> <div class="spacer"> </div> </div> <div id="recentPosts"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="postContainer" id="post-<?php the_ID(); ?>"> <div class="postTitleContainer"><h2 class="postTitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2></div> <div class="postContent"> <font face="helvetica" size="2" color="#445261" style="color:#445261;font-size:11px;font-family:'Trebuchet MS',helvetica;"> <?php the_excerpt('Read the rest of this entry »'); ?> <p><a href="<?php the_permalink() ?>" style="text-decoration:underline;color:#445261;" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">Click here to read the rest of this post.</a> </font> </div> <p class="postmetadata"><font face="helvetica" size="2" color="#445261" style="color:#445261;font-size:11px;font-family:'Trebuchet MS',helvetica;"> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></font></p> </div> <?php endwhile; ?> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php get_search_form(); ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
Issue #2:
On the same page, if you look on the right side you will see it says No Categories even though I have 4.In my sidebar.php file I have the following code:
<div id="sideBarContainer"> <div id="sidebar"> <h3 class="sideBarTitle">Categories</h3> <ul id="categoryList"> <?php wp_list_categories(); ?> </ul> </div> </div>
But if you navigate in to an actual category such as https://www.tdslaw.com/blogs/jeff_pniowsky/category/cat2/cat2-sub1/ you can see all the categories fine.
Can anyone provide some insight as to why this is happening?
- The topic ‘2 Different Category Issues’ is closed to new replies.