Archived topic
How to disable sidebar elements
8 replies · Started by Vincent on December 13, 2021
Hi,
I'm Dispatch theme user.
I don't find how to choose elements I want and where I want. Not not all elements in all pages.
For exempel only WPSP "simple sidebar" on the home page and only WPSP "sidebar" on the article and post.
Hereafter my Dashboard > WP Show Posts > All Lists. With six lists:
Align
Standard
Sidebar
Header
Simple
Simple Sidebar
I search in WPSP options and in Layout Metabox but don't find this option.
May be in Layout Element Apparence > elements ?
I'm beginner and I'm scary to make a bad things!
I try to follow this video https://docs.generatepress.com/article/layout-element-overview/ but not really the same example...
Can you help me?
Hi there,
the WP Show Posts lists are displayed using the WPSP Shortcodes.
This post in the original site explains the lists and how they are used:
https://gpsites.co/dispatch/using-wp-show-posts/
Have a read through that first, then let us know if you need any more info - happy to assist :)
yes I have also read this article before :-)
But how to hide for example the WPSP sidebar on the home but not on articles/post?
Aahh... thats a little more tricky as the WPSP Shortcode is added to the Right Sidebar which is NOT dynamic.
There are two options available.
1. Use a Block element:
https://docs.generatepress.com/article/block-element-overview/
1.1. Add the WPSP Shortcode into the block content.
1.2. Select the Element Type > Hook and set the Hook to before_right_sidebar or after_right_sidebar
1.3. Set the Display Rules > Location to where you want the list to appear.
NOTE: The limitation of this method is it can only displayed at the Top or Bottom of the sidebar.
2. Use a plugin to create dynamic sidebars
https://en-gb.wordpress.org/plugins/custom-sidebars/
Then you can add different content to the sidebar for different places.
OK if I understanbd well there is no way with my actual GP Display theme to choose witch elements of WPSP are activate or not on each pages.
Because "WPSP sidebar" and "simple sidebar" are in fact with the same contents.
Apart from having duplicate content for visitors, it's not very interesting...
At least, can I remove from all my blog "Sidebar" or "Simple sidebar" to avoid duplicate contents for my visitors ?
The names of the WPSP lists simply relate to each of the styles.
You can edit any of the WPSP Lists and change its settings e.g different taxonomy to show different content. Or you can remove them from the sidebar widgets if you don't require them,
Thanks for the taxonomy tips :-)
To remove them from the sidebar widgets if I don’t require them, how disable them like in this example :
https://blog.airpaz.com/en/
Because there is no disable mode... only delete...
By this way there is no reverse possibility :-)
Thats right you can only delete them.
But if you want to add them back then the doc i provided above provides the HTML you need to add them. Or just ask and we can assist.
In fact to activate or not it was simply in customiser > widget > sidebar !
However I can't choose to activate on some pages and not on others, but it's better than nothing ;-)