Title: Does not work with sub-categories
Last modified: August 30, 2016

---

# Does not work with sub-categories

 *  Resolved [kopis.dev](https://wordpress.org/support/users/kopisdev/)
 * (@kopisdev)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/does-not-work-with-sub-categories/)
 * Hello,
    I am facing the following issue: On my website we have various categories
   for our posts and among them a parent category named “blogs” and a number of 
   subcategories within that category. If a create a custom sidebar and define it’s
   location to the parent category “blogs” it works and shows in all subcategories
   but if I define as location a subcategory then it does not work and shows the
   widgets for the default side bar Any ideas how to fix it ?
 * [https://wordpress.org/plugins/custom-sidebars/](https://wordpress.org/plugins/custom-sidebars/)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/does-not-work-with-sub-categories/#post-6709004)
 * Hey kopis.dev,
 * How are you doing today?
 * Can you please post screenshot of your categories and also rules that you’re 
   using to display sidebar on those sub categories so we can try to recreate the
   issue.
 * Looking forward for your response 🙂
 * Cheers,
    Bojan
 *  Thread Starter [kopis.dev](https://wordpress.org/support/users/kopisdev/)
 * (@kopisdev)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/does-not-work-with-sub-categories/#post-6709012)
 * Screen shots can be found at the following links :
    [Capture 1](http://blogs.creativeopinions.org/wp-content/uploads/2015/11/categories1.png)
 * [Capture 2 ](http://blogs.creativeopinions.org/wp-content/uploads/2015/11/categories2.png)
 * The rules are as follows
    1 custom side bar for category Blog-Dennis Villiardos
   1 custom side bar for category Blog-Vasilis Villiardos and so on for the categories
   within the category “Blog” also 1 custom sidebar for the rest of categories The
   default sidebar applies only for the homepage
 *  [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/does-not-work-with-sub-categories/#post-6709047)
 * Hey there kopis.dev,
 * Thanks for the screenshots but you didn’t post rules which you’re using to display
   those categories.
 * I’ve tested this on my end, I’m assuming that you’re referring to category archive
   pages rather then single post pages. By setting sub category in Category Archives
   in a separate sidebar, it is being displayed properly on the sub category page
   [http://screencast.com/t/7vmjRfUHo](http://screencast.com/t/7vmjRfUHo). Screenshot
   of the front [http://screencast.com/t/wtkBXt4Kuw](http://screencast.com/t/wtkBXt4Kuw).
 * Which rules you’re using to display sidebars?
 * Please let me know 🙂
 * Cheers,
    Bojan
 *  Thread Starter [kopis.dev](https://wordpress.org/support/users/kopisdev/)
 * (@kopisdev)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/does-not-work-with-sub-categories/#post-6709048)
 * Hello!
    I apologize for not including the assorted rules for the side bars Initially
   the first rule that I have set up for the parent category (“blogs”) was the following
   [http://www.screencast.com/t/M0HVLW1r](http://www.screencast.com/t/M0HVLW1r) 
   Then to expand it for the each category I deleted the above rule and created 
   4 separate ones for each subcategory as follows : [http://www.screencast.com/t/tnZP2ioBag](http://www.screencast.com/t/tnZP2ioBag)
   [http://www.screencast.com/t/uUsa4VMy](http://www.screencast.com/t/uUsa4VMy) 
   [http://www.screencast.com/t/507lmim9jZS](http://www.screencast.com/t/507lmim9jZS)
   [http://www.screencast.com/t/xZTsrPLyy9A](http://www.screencast.com/t/xZTsrPLyy9A)
   And I have also one rule for the rest of the single posts [http://www.screencast.com/t/bzcnKfzP7sp0](http://www.screencast.com/t/bzcnKfzP7sp0)
   Thank you in advance Peter
 *  [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/does-not-work-with-sub-categories/#post-6709050)
 * Hey Peter,
 * Please note that the above rules you are settings are affecting only single post
   pages, I was under impression that you’re looking to setup sidebars on category
   archive pages, can you please advise on this?
 * So for example setting Blogs there as displayed on this screenshot [http://www.screencast.com/t/M0HVLW1r](http://www.screencast.com/t/M0HVLW1r)
   will display specific sidebar on SINGLE post pages that are have that category.
 * You can apply the same rules for subcategories as well.
 * If you’re looking display different sidebar on category archive pages (page that
   display posts from that category) you’re going to have to use “For Archives” 
   section as displayed on this screenshot [http://screencast.com/t/7vmjRfUHo](http://screencast.com/t/7vmjRfUHo).
 * Best regards,
    Bojan
 *  Thread Starter [kopis.dev](https://wordpress.org/support/users/kopisdev/)
 * (@kopisdev)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/does-not-work-with-sub-categories/#post-6709051)
 * That is correct , I am interested in setting up custom sidebars for single post
   pages.
    The concept is as follows: We have various categories on our site with
   posts from different authors but under a single brand. We want to those authors
   to post articles expressing their personal opinions , so we created a new category
   named “blogs” and the respective subcategories for each author as “blog-AuthorsName”.
   the objective is to display a different sidebar – content with those posts from
   the posts in the rest of the site. If I define a rule for the parent category“
   blogs” it works it terms that it shows the custom sidebar content in all subcategories.
   But if I want to assign a custom sidebar to any of the subcategories o from the
   parent so that each author has it’s own sidebar it does not works and it displays
   the sidebar content assigned to the single posts Regards
 *  [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/does-not-work-with-sub-categories/#post-6709052)
 * Hey again kopis.dev.
 * Thanks for the clarification, I’ve tested this with two different sidebars one
   set for parent and other for sub category, single post pages are displaying different
   sidebars properly, see video [http://screencast.com/t/QZfyngSbQ1](http://screencast.com/t/QZfyngSbQ1).
 * As you’re doing the same thing I’m assuming some sort of conflict, can you please
   try testing for conflicts by using default WordPress theme like Twenty Fifteen
   and deactivating all other plugins as displayed in the following flowchart to
   know which theme/plugin is conflicting if any.
 * [http://premium.wpmudev.org/wp-content/uploads/2013/12/Support-Process-Support-Process.png](http://premium.wpmudev.org/wp-content/uploads/2013/12/Support-Process-Support-Process.png)
 * Please let me know if you find anything 🙂
 * Cheers,
    Bojan
 *  Thread Starter [kopis.dev](https://wordpress.org/support/users/kopisdev/)
 * (@kopisdev)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/does-not-work-with-sub-categories/#post-6709053)
 * I will do and get to you
 *  [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/does-not-work-with-sub-categories/#post-6709054)
 * Please let me know how that goes 🙂
 *  Thread Starter [kopis.dev](https://wordpress.org/support/users/kopisdev/)
 * (@kopisdev)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/does-not-work-with-sub-categories/#post-6709140)
 * We thought that we give a try and implement the idea of separate sidebars for
   each category on the production site and it worked.
    What was the reason that
   was not working on the test site we do know yet.
 *  [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/does-not-work-with-sub-categories/#post-6709143)
 * Hey kopis.dev,
 * Glad you managed to get this to work. AS for the reason why it wasn’t working
   on a test site it is really hard to say without investigating this further.
 * Have a nice day!
 * Cheers,
    Bojan

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Does not work with sub-categories’ is closed to new replies.

 * ![](https://ps.w.org/custom-sidebars/assets/icon-256x256.png?rev=1414065)
 * [Custom Sidebars - Dynamic Sidebar Classic Widget Area Manager](https://wordpress.org/plugins/custom-sidebars/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-sidebars/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-sidebars/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-sidebars/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-sidebars/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-sidebars/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/does-not-work-with-sub-categories/#post-6709143)
 * Status: resolved