To do so, you need to combine 2 conditions:
- Show the widget is the page is a Post type
- Show the widget if the page belongs to X category or Y tag
http://i.wpne.ws/Rsyy
Let me know if it helps.
Hello, thanks for your answer but it doesn’t work. Here is some more details :
I want to show an ad in my sidebar. There is a default ad, and some specific ads that will show when articles are post in a specific category or with a specific tag.
Exemple :
4 categories or tags possible : carpe, carnassier, mer, coup. On all website article, there is a default ad, and if i use a specific tag or post the article on a specific category above, it will show the specific ad.
I think the problem is the OR condition. If i do the tag=carnassier and page=article, it will show on all my articles… and if i do only tag=carnassier, it doesn’t work! And if i do page=article and category=carnassier, it’s showing on all articles…
Any possibility to change the OR condition with a AND condition? Or a solution for my case?
Thanks a lot
Regards
Geoffray
I think the problem is the OR condition. If i do the tag=carnassier and page=article, it will show on all my articles… and if i do only tag=carnassier, it doesn’t work! And if i do page=article and category=carnassier, it’s showing on all articles…
Any possibility to change the OR condition with a AND condition? Or a solution for my case?
I understand now, thanks for the extra details!
Jetpack only offers the OR condition at the moment, but I agree that it would make sense to add an AND condition. I created a trac ticket to take note of your suggestion, and we’ll consider it for a future Jetpack update!
Thanks a lot! But i have another question, it can help me…
If i work with tags on my posts, any chance to make it works? I just want something to use a tag, and if the post have the special tag, it can show the special widget… it would be helpfull, i think it can works but it seems to don’t work like this. I’m wrong?
Regards
Geoffray
I just want something to use a tag, and if the post have the special tag, it can show the special widget
That’s possible indeed. Your widget should be set like so:
http://i.wpne.ws/Rw3G
I did…. but it doesn’t work for posts! That’s why i think there is a problem. Do you want some screenshots?
Where the tags are set? In a post, right? I can use multiple tags?
I don’t understand why it’s not working….
Thanks
I just tested it on my own site, and it seems to work properly.
Where the tags are set? In a post, right? I can use multiple tags?
Yes, tags are set in a post, and you can use as many tags as you want, like so:
http://i.wpne.ws/RydX
Could you post a few screenshots of your widget visibility settings, and send me a link to your blog and the posts that include the tags you used in your widget settings?
Thanks!
You can find screenshots to see how it’s set up… and how it doesn’t work 😉
Tag
Visibility
Result
Is the widget properly displayed if you remove all visibility conditions?
Yes, i just tried with the ad displayed in screenshots. When i use visibility and i put tag = carnassier…. nothing appear. But when i edit the article, i can see the good tag in my post….
I use WordPress SEO by YOAST, is there a problem with this plugin? Because when i go on “All posts” i have a new column “Main Tag” and nothing appear in that column… but everything is ok under tag column.
SEO
The SEO plugin won’t create any conflicts.
Could you try to deactivate any caching plugin that may be active on your site at the moment?
Let me know if it helps.
I just tried now to disable all other plugins : same problem. Do you want an access on my website to try to search?
Is that a theme problem? I don’t think so, it’s a premium theme Max Mag).
Thanks a lot to trying to help me.
Regards
Geoffray
Could you contact me via email and create a temporary admin account on your site, so I can try to understand the problem?
Thanks!
i have the exact same theme and the exact same problem. any way to post how you resolved this issue?
Jeremy helps me to find an issue… i’ve asked the theme author too and no solution! The only think i had from theme author (MVP Theme) is :
“Hey, the only thing I can suggest is that you might want to try using Section Widget: http://ww.wp.xz.cn/plugins/section-widget/”