I've got a bunch of post types and am having this problem on only one of them.
The taxonomy is appearing twice on the archive. *See image.
I've looked at everything (content template, archive, post type, widget) and can't figure it out. Can you help? Thank you!
hidden link
Hi,
Thank you for contacting us and I'd be happy to assist.
If this archive page is set to use Toolset's WordPress Archive, please check if the shortcode for showing the taxonomy "wpv-post-taxonomy" is added twice.
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-taxonomy )
If the shortcode is used only once, you're welcome to share temporary admin login details, for further troubleshooting.
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
regards,
Waqar
Thank you for sharing these details.
During troubleshooting, I noticed that your website is using a WordPress Archive "Search results, Stays, Outdoors, Restaurants, Shops, Camps, Attractions, Trails" for this archive page.
In the Loop of this archive, there are conditional statements that are set to show different custom taxonomies, based on the current post's types.
The condition of the "restaurant" post type was added twice, which is why the "restaurant-feature" type taxonomy items, were showing twice on the front end too:
[wpv-conditional if="('[wpv-post-type]' eq 'restaurant')"]
[wpv-post-taxonomy type="restaurant-feature"]
[/wpv-conditional]
I've removed one of those conditional blocks and this is fixed now.
Here is the updated code in the archive's loop item template:
<div class="title-section-wrapper-archive">
<div class="archive-image">
[wpv-post-featured-image size="archive-image" class="archive-image"]
<div class="archive-text-box">
<div class="archive-titles">
<div class="archive-region">
[wpv-post-taxonomy type="region"]
<h2 class="archive-box-title">[wpv-post-link]</h2>
</div>
<div class="archive-description">
[wpv-post-excerpt format="noautop"]
</div>
<div class="archive-perfect">
[wpv-post-taxonomy type="perfect-for"]
[wpv-conditional if="('[wpv-post-type]' eq 'annual-festival')"]
[wpv-post-taxonomy type="attraction-perfect-for"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'attraction')"]
[wpv-post-taxonomy type="attraction-perfect-for"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'campground-rv-park')"]
[wpv-post-taxonomy type="campground-style"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'eats-guide')"]
[wpv-post-taxonomy type="restaurant-feature"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'essential')"]
[wpv-post-taxonomy type="essentials-special"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'farm-and-farm-stand')"]
[wpv-post-taxonomy type="farm-product"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'golf-course')"]
[wpv-post-taxonomy type="golf-amenity"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'meetings')"]
[wpv-post-taxonomy type="meeting-features"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'more-things-to-do')"]
[wpv-post-taxonomy type="good-for"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'outdoors')"]
[wpv-post-taxonomy type="outdoor-thing-to-do"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'pocono-lake')"]
[wpv-post-taxonomy type="outdoor-thing-to-do"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'pocono-town')"]
[wpv-post-taxonomy type="town-good-for"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'park-preserve')"]
[wpv-post-taxonomy type="outdoor-thing-to-do"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'sales')"]
[wpv-post-taxonomy type="restaurant-feature"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'shop')"]
[wpv-post-taxonomy type="shop-good-for"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'summer-camp')"]
[wpv-post-taxonomy type="summer-camp-details"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'trail')"]
[wpv-post-taxonomy type="outdoor-thing-to-do"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'restaurant')"]
[wpv-post-taxonomy type="restaurant-feature"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'waterfall')"]
[wpv-post-taxonomy type="vacation-house"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'wedding')"]
[wpv-post-taxonomy type="wedding-style"]
[/wpv-conditional]
[wpv-conditional if="('[wpv-post-type]' eq 'where-to-stay')"]
[wpv-post-taxonomy type="wedding-style"]
[/wpv-conditional]
</div>
</div>
</div>
</div>
</div>
I hope this helps and please let me know if you need any further assistance around this.
Thanks, Waqar!
I have no earthly understanding of this.
I removed [wpv-conditional if="('[wpv-post-type]' eq 'restaurant')"]
[wpv-post-taxonomy type="restaurant-feature"]
and got this (see image)
so I put it back in and now the problem's solved, but...I don't get it.
You didn't have to remove the conditional block, because I had already removed it.
Looks like, you've updated the archive with the complete code that I shared in my last reply and it seems to have been fixed now.
Can you please confirm the same?
It's fixed! Thank you so much, Waqar. You're the best.
My issue is resolved now. Waqar, you're always the best. Thank you!