How might I create a sidebar for a set of posts for a category?
Disclaimer: I could really use a very simple explanation since I’m not a coding pro but can do basic copy and paste . I’ve also created a child theme.
Thanks!
How might I create a sidebar for a set of posts for a category?
Disclaimer: I could really use a very simple explanation since I’m not a coding pro but can do basic copy and paste . I’ve also created a child theme.
Thanks!
Hi @mksubherw,
Thanks for the disclaimer. We need more information. Do you mean you want certain posts to have sidebar and others should be fullwidth? Please clarify.
The easiest way is by enabling sidebars on Theme Options. Then hide on other category using CSS. See this thread.
That is the recommended way if you’re not familiar with coding because any syntax error might be disastrous.
Hi Lely,
Thanks for replying! Sorry for being so unclear. All my posts have sidebars which I’m OK with.
What I’d like is: for a category of posts (say ‘Animals’ category), I would like to show a specific sidebar ‘A’. For a category of posts (say ‘Cars’ category), I would like to show a specific sidebar ‘B’.
How might I accomplish that?
Here’s an example posts page which I’d like to have a specific sidebar for:
http://softskillsfordesigners.com/ask-for-balanced-feedback/
Hello @mksubherw,
Thank you for the clarifications. To achieve what you have in mind, simply go to Appearance > Sidebars and create your custom sidebar. Once you have created the sidebar, you will need to assign it to a particular category.
For example, you create “Animal Sidebar”, you will then need to assign this to Animal category:
And then you will have to assign this sidebar to a category so that the sidebar will only display in that category archive page only:
Lastly, you need to go to Appearance > Widgets to add your widgets into that sidebar:
For more details about the Unlimited Sidebars feature in the theme, please check out this knowledge base article:
Thanks for the info! However, when I do that it doesn’t show the side bar on the post.
What could be the reason? Attached below you can see how i set up the sidebar called “Humility”. I should be able to see the sidebar on this page (http://softskillsfordesigners.com/introducing-humility/) but nothing shows up on the left.
Hi @mksubherw,
Unfortunately, I can’t see on your screenshot if you have added a widget inside the HUMILITY sidebar. If you can confirm there is content, please share credentials inside a secure note so we can double check the settings
Ok just shared credentials!
Hey @mksubherw,
I tried to login with the given credentials to check your setup but it’s not working, either username or password is incorrect. Please double check the credentials. However i checked your post and It seems like there is no content inside the sidebar. Probably the sidebar assignment is not correct. Go to Appearance > Sidebars, under All Pages and Posts select the posts where you want to display your custom sidebar:
Let us know how this goes!
Thanks Nabeel. Will look into credentials again when I get home. Meanwhile, do I have to select all the posts I want? Can’t the sidebar just apply to a category and all posts within the category have the side bar automatically? It’ll be a lot of work to manage later on when new posts are written and each time I’ll have to add the sidebar manually.
Also, I’ve added a navigation component to the sidebar widget. Will send screenshot later.
Thanks again.
Here’s a screenshot of my widgets. Also I’ve added the guest username and password in the secure note - thank you for taking a look.
Hello @mksubherw,
You have selected “Relationships” or "Humility’ in the All Taxonomies assignment when you created the sidebar. This would mean that the sidebar will only display in the Relationships or Humility category archive.
To display the sidebar in your category archive pages, please go to X > Theme Options > Blog > Archives and select “Use Global Content Layout” as your layout.
If you want to sidebar this sidebar to your single blog posts, you will need to assign the sidebar as well.
Hope this helps.
Thanks! At least it shows on the category archive page. i wish it would propagate to the posts pages too. Any way to apply the sidebar to the posts automatically ? Without me having to manually add it?
Hello @mksubherw,
If you wish the sidebar to display in your posts and pages, you will have to manually assigned the sidebar. It would be possible with custom development which is beyond the scope of our support.
Please note that custom coding is outside the scope of our support. Issues that might arise from the use of custom code and further enhancements should be directed to a third party developer.
Best Regards.
Oh that’s a bummer. Have you heard of a plugin that might do this for me?
Hey @mksubherw,
Regretfully no, the only option available is assigning the sidebar manually under All Pages and Posts (see screenshot)
Thanks!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.