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 ?
-
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,
BojanScreen shots can be found at the following links :
Capture 1The 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 homepageHey 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. Screenshot of the front http://screencast.com/t/wtkBXt4Kuw.
Which rules you’re using to display sidebars?
Please let me know π
Cheers,
BojanHello!
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
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/uUsa4VMy
http://www.screencast.com/t/507lmim9jZS
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
Thank you in advance
PeterHey 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 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.
Best regards,
BojanThat 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
RegardsHey 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.
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
Please let me know if you find anything π
Cheers,
BojanI will do and get to you
Please let me know how that goes π
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.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
The topic ‘Does not work with sub-categories’ is closed to new replies.