- This topic has 11 replies, 3 voices, and was last updated 5 years ago by
David.
-
AuthorPosts
-
May 27, 2021 at 4:00 pm #1800822
André
Hi there!
I have a blog with many Categories and I am building a custom sidebar for some of them with Elements (Block – Right Sidebar).
So, lets say I have the following:
– Category A » Sibebar A
– Category B » Sibebar B
– Category C » Sibebar C
– EtcI have set Location Rules for each sidebar:
– Sidebar A: Post Category A + Post Category Archive A
– Sidebar B: Post Category B + Post Category Archive B
– Sidebar C: Post Category C + Post Category Archive C
– EtcAll good until now and these customs sidebars are working properly.
The different Elements custom sidebars are showing in A, B, C, etc categories posts and the default WP “widgetized” sidebar in all other posts that don’t have a custom sidebar.
But I want also to replace the default WP “widgetized” sidebar with an Elements sidebar. I have built one general right sidebar and set the Location Rule to “Entire site”. And, as I expected, this rule overrides all the others and this general sidebar shows in all posts, in all categories.
In other words, I want to:
1. Replace my default WP sidebar with different custom Elements sidebars for some post categories
2. Have a fall-back Elements custom sidebar to show in all other postsI understand that I can add exclusion rules to the general/fall-back sidebar for all the categories with custom sidebars, but that would mean a lot of manual work.
Do you have any other suggestions how can I achieved this? Is there a way to prioritize location rules so that one doesnt overrides the other?
Sounds confusing but I hope I was clear enough.
Thanks,
André
May 28, 2021 at 4:07 am #1801313David
StaffCustomer SupportHi there,
just to explore the options – a quick question.
How does the Entire Site Sidebar compare to the other sidebars – Does the content in this sidebar also display in your Category specific sidebars ? Or is it completely different?
May 28, 2021 at 4:29 am #1801339André
Hi David! Thanks for your reply.
I this case, it’s (almost) completely different. For example, in the Entire Site Sidebar I will have a generic banner promoting a tour agency. In the Category Sidebars (tourist destinations) I will have a banner promoting a specific tour.
I think I understand from your questions that I can have a Entire Site Sidebar and Category Sidebars that includes the generic banner plus some specific content. That sounds also interesting to explore.
Thanks,
André
May 28, 2021 at 8:03 am #1801790David
StaffCustomer SupportAs an option:
There are two additional sidebar hooks –before_right_sidebar_contentandafter_right_sidebar_contentwhich could be deployed. So if the Entire Sites content could be displayed everywhere – then you could hook in Category specific elements using those hooks.May 28, 2021 at 8:41 am #1801823André
Unsderstood. That could be handy in some situations, for sure.
For the present situation, I need totally different sidebars for each category, besides the Entire Site custom sidebar. My only option would be to set location and exclusion rules “one by one”? Or is there a simpler way?
Thanks David!
May 28, 2021 at 9:59 am #1801900Ying
StaffCustomer SupportFor the sidebar of each category, you just need set its location, don’t need to set excluded locations.
For the entire site sidebar, if you have specific sidebars for single posts, then you can try to exclude posts > all posts. Otherwise, I’m afraid you’ll have to manually exclude them one by one.
May 28, 2021 at 2:23 pm #1802073André
Thank you both. I undestand my options.
I will probably stick with the default WP sidebar for the Entire Site Sidebar and use Elements for categories sidebars.I will try to recreate in the default WP widgetized sidebar the buttons I need. I need this blue/orange buttons (made with in Elements with GB) https://www.tempodeviajar.com/bali-indonesia-guia-fazer-ver-visitar/
I may need some help inserting the SVG iscons inline with the text, but I will look for a solution here in the support forum and open another ticket if I cant figure it out for myself.
Cheers,
André
May 28, 2021 at 7:39 pm #1802177Ying
StaffCustomer SupportNo worries, don’t hesitate to ask for help 🙂
May 29, 2021 at 2:19 am #1802367André
Hi again!
Still evaluation options here… 🙂
One quick question. Does it causes any bloat to have many different Block Sidebars with many location and excusion Rules? Say about 50 sidebars and 100 exlusion rules.
Thanks
May 29, 2021 at 4:48 am #1802457David
StaffCustomer SupportIt probably won’t make any noticeable difference to the performance of the site…. but it sounds like a workflow/maintenance nightmare to upkeep 50 static sidebars.
Might be better to look at dynamically generating the sidebars content as opposed to conditionally displaying static sidebars. Plugins like ACF/Metabox will allow you to add options to your Categories, which could be used to generate the sidebar content…
May 29, 2021 at 7:34 am #1802745André
Thanks David! That sounds a bit advanced for me. I will have a closer look anyway, but I’ll probably keep my current system for now.
I have been runing like this for some years (with a plugin for widget sidebars that I’m now replacing with blocks sidebars) and after the first setup is not so work intensive. It´s far from perfect… but I dont change each sidebar content that often.
Cheers,
André
May 29, 2021 at 4:27 pm #1803034David
StaffCustomer SupportNo problems – if it works for you then its all good!
-
AuthorPosts
- You must be logged in to reply to this topic.