I have database of movies and I need to display logo "EU MEDIA Programme" on the single page of each movie that has term "media" in custom taxonomy "Loga". I'm using View "Logo MEDIA" and I i'm trying to use Query Filter for this but it's not working for me.
The term "media" has been assigned to this movie A dychejte klidne (custom type Filmy): hidden link
However the MEDIA logo displays on all single pages of custom type Filmy - e.g. here: hidden link
Please see screenshot attached. I can provide you login details if help us to speed up the process.
I'm not sure how the documentation led you to using a View with Query Filters to add the image when posts have a particular taxonomy term assigned, although that link you shared has recently been rendered obsolete.
You need a conditional shortcode so that where you have a View that displays Films, in the output section it checks if the current Film being looped over has the media term (of the Loga taxonomy) and if so outputs the image.
The GUI for inserting conditional shortcodes was missing support for taxonomies until the very last update, where it was added (I've pointed out to the documentation team that page needs updating).
So, in the output section of your View where you insert the img for the logo, surround the img tag with a conditional shortcode.
Use the "conditional output" button to insert the shortcode. As you can see in my screenshot (I'm using a 'status' taxonomy) you can directly insert such checks, which will add markup something like this:
[wpv-conditional if="( CONTAINS(#(status),'submitted') )"]
<p>I could add my img tag here</p>
[/wpv-conditional]
Hi Nigel, I was trying to create the conditional output following your instructions but it's not working for me - please see screenshot with conditional output that has been added to loop item. Any chance to provide you login so you can check it from wp administration? Thank you.
Thank you for your help. I tried to add the conditional directly to a view shortcode in Elementor single post template and it works fine. So my issue is resolved now. Thank you!