How to disable some widget when show single post?

Posted in: Newspaper
Post count: 21

Hi tagDIV,

When i config category with custome sidebar then all widget of that custome sidebar will effect in single post, category. But, i want disable some widget, don’t show when user view single post. That widgets will show when user view category.

Best regards,

Post count: 1291

Hi,

You can set a different sidebar for each post – http://screencast.com/t/QxHTzJbcfM
This will override the category sidebar.

Thank you, Emil G.

Post count: 21

Hi Emil,

Every categories, i define with a sidebar, in sidebar config some widget. Every sidebar on categories is different with widget.

I have a lot of categories, if every post set with diffent sidebar, will waste time when post and waste time when create a lot sidebar copy.

How can i mofidy by code?

Best regards,

Post count: 6600

Hi,

That is the best way you can do this, create a sidebar for each category and set from theme panel, for post page you can only use one sidebar.
The was designed to work like that and doesn’t have n option for this. If you want to change the code to achieve this we recommend you to hire a developer to do this for you as we cannot offer custom work as we work hard on the development, updates, fixes and support.

Thanks

Post count: 9544

What we do is have five custom sidebars, spec’d out for stuff like “entertainment” and then “political” and then “business” and then “technology” and then “opinion” … and then for each post we can choose which sidebar and custom widget setup we wish to use per post. This is simplest way to achieve a wide variety of custom layouts.

SO, for a category like books, music, film/tv, we can use the “entertainment” sidebar. We don’t need to create four sidebars for each “category” which might be grouped in some way with “entertainment.” Same with business, and technology, etc.

Often you can create a “map” on paper or in a planning tool, which determines how you might group various categories into larger master categories, and then create a limited number of master sidebars which can be used by all the sub categories within that master category. And then perhaps a “general” sidebar (“Default”) for when you don’t have a need to slot a post into a custom category sidebar.

Anyway … that’s how we do it to make it more manageable. 🙂

Post count: 388

Also, I hear bad things about some aspects of Jetpack, but its widget visibility component does make it easy to show/hide each widget on a per-post / category / date / etc. basis.

Post count: 9544

We don’t use jetpack as it’s a major slowdown to the site, waiting for all that stuff to load from automattic’s servers. But some cool stuff. Mainly it’s a way of adding features from wordpress.com to self hosted sites. But watch the warnings from PageSpeed Insights pile up! 😉

Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.