WordPress.org

Ready to get started?Download WordPress

Forums

Problems using visibility plugin with posts & sidebar (1 post)

  1. stupidzbu
    Member
    Posted 7 years ago #

    Ok,

    I finally understood how to use the category visibility plug-in and I am even making individual template files for different categories with their own specific sidebars. Here is where I am starting to run into problems. I have a parent Category, Category 12, with 5 children categories. I created a Category-12.php and a Sidebar-12.php file.

    I want to add code to Sidebar-12.php to ONLY list the parent Category-12 and children.

    I could use 'wp_list_cats' and exclude all the categories that I don't want to show up, but that makes it a head ache if I add new categories later on. So, I tried to use:

    php the_category('', 'multiple' );

    I then made a test post under Parent with all 5 children included and had what I wanted. But, when I went to post again, I purposely did Parent & 1 child, and it listed only the parent and that specific child in the sidebar, excluding the results from the previous post. If this is too wordy, let me show a diagram:

    Test post #1 goes to parent and 5 children, sidebar shows:
    -> Parent
    --> Child 1
    --> Child 2
    --> Child 3
    --> Child 4
    --> Child 5

    Test post #2 goes to parent and Child 5, sidebar shows:
    --> Parent
    --> Child 5

    None of the other posts made to Child 1-4 show up. any ideas?

    The main page is http://www.ihavetoblog.com
    The Cat specific page is http://ihavetoblog.com/category/deals/

    Where am I going wrong with this?

Topic Closed

This topic has been closed to new replies.

About this Topic