This is for a museum that has shows in different galleries I have a view that displays a synopsis of each show on a page like this (below) The gallery name is a taxonomy wpvgallery
[wpv-view name="name of view" wpvgallery="firstgalleryname" ]
[wpv-view name="name of view" wpvgallery="secondgalleryname" ]
[wpv-view name="name of view" wpvgallery="thirdgalleryname" ]
Occasionally a single show is in multiple galleries and when that's the case both gallery names appear within both of the view when i insert the taxonomy in the loop to display the gallery's name
You can see the issue here hidden link
The Horse show is in two galleries and it displays twice (which is acceptable as its in two rooms) but it would be better if only the correct and single gallery name appeared in each of the respective views.
I know i could simply remove one of the short codes but i'd like to keep the museum staff off that page- so am looking for something a bit more programmatic
Thank you for contacting us and I'd be happy to assist.
If I understand correctly, you'd like each gallery (e.g. "The Founder's Gallery, Griffin Main Gallery") to show only once on the page, even if it is covered in the results of multiple views. If that is correct, I'll need to see how these views are set up in the admin area.
Can you please share temporary admin login details, in reply to this message?
Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.
I was able to hide the duplicate results, using the following steps:
1. In the view "GriffinGalleriesBlockView", I included the "data-post-id" attribute in the div with class "main-gallery-show":
( screenshot: hidden link )
2. Next, in the view's "JS editor", I included some custom script that hides all div elements with class "main-gallery-show", where the "data-post-id" attribute matches and it is not the first instance:
( screenshot: hidden link )
Note: The custom code examples from our forum are shared to get you started in the right direction. You're welcome to adjust them as needed and for more personalized customization assistance, you can consider hiring a professional from our list of recommended contractors: https://toolset.com/contractors/
Waquar- Im sorry we're not understanding each other fully- what you did removes the whole second instance of the show- Im wanting to remove the additional show names. The attached image has crossed out the info id like not to display
So the
[view that selects the griffin main gallery] shows two titles "Griffin Main Gallery and the Founders gallery - But in that view id like it to on show the Griffin Main Gallery taxonomy title ony
in the [view that selects The Founders Gallery] Id like it to display that galleries name only and not the Griffin Main Gallery
However, you need to show this term's name and not the slug. For this, you'll need to register a custom shortcode, that accept the term's slug value and returns its name: