category specific sidebar
-
Hey everyone,
I’ve read the articles regarding conditional tags and customizing the sidebar and ive started to implement some new code into WordPress. I’m trying to get certain information in my sidebar to display when specific categories are being displayed.My goal is to have parent/child nav links on the left sidebar for categories/sub categories that are within the CURRENT category that is being viewed. Here is a snippet of the code im currently working with:
<?php
if (is_home()) {
echo "<ul>";
wp_list_cats('optionall=0&sort_column=name&list=1&children=0');
echo "<ul>";
} elseif (is_category(35)) {
echo "<ul>";
wp_list_cats('categories=array(category35)');On the home page, it displays just the parent categories, which is good so far. But now on the specific category pages it is displaying parent/child links (good), but for ALL categories (bad). If someone can help me tweak the code so that i can get it to where when a user clicks the link that brings them to the “category35” page, only the category35 parent/child links display, thatd be great, thanks!
- The topic ‘category specific sidebar’ is closed to new replies.