Show custom sidebar only in primary category ?
-
Hello there,
I publish posts regularly in more than one category. With Yoast SEO, I can define a “primary category”.
Example:
My post is published in
Category A [primary]
Category B
Category FHow can I make sure that my custom sidebar is only showing if a post is attached that primary category (and not in other categories)?
Background:
In my real world example from my site, I have created a sidebar for Category B – and this sidebar will also show if the primary category is set to Category A.This is confusing, because the search intent for that post is definitely for category A (not B).
How can I achieve that my custom sidebar is ONLY showing in the primary category, if I have published a post in multiple cagegories?
Can you add an option in the backend to achieve this? For example:
“[x] Only show this sidebar is category is set to primary”Thanks and best regards
Tom
- The topic ‘Show custom sidebar only in primary category ?’ is closed to new replies.