Hi there
We have a CPT (custom post type) called Therapies, which has 4 taxonomies (Energy Healing, Massage, Natural Health, Talking Therapies). On an archive page we want to display the titles of these 4 taxonomies and underneath these titles, we want to display the post links of the therapies.
We've tried creating a parent taxonomy view that is dropped onto the archive page, and then embedding a child view filtering by the page where the view is shown. But all we have is the taxonomy titles repeated 4 times over, and no posts being displayed under these headings. You can see this here: hidden link
Can you help?
Thanks.
Hello,
I assume you are using Views WordPress Archive to customize the Therapies archive page, please edit the WordPress Archive(ID 1328), in section "Loop Editor", put the taxonomy view's shortcode outsider Views loop, for example:
...
[wpv-items-found]
[wpv-view name="your-taxonomy-view-slug"]
<!-- wpv-loop-start -->
<wpv-loop>
... here display post information ...
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
...
Thanks, we're making progress. The taxonomy titles are no longer repeating as we've moved them outside the loop. However, the posts within the taxonomies are still not displaying.
We're using a child view called therapies-posts-view (ID 1332) and a parent view (therapies-taxonomy-view ID 1331) that we're dropping into the archive. Where are we going wrong?
Thanks for your support.
I am not sure how do you setup the view ID 1332 and ID 1331, but the problem URL you mentioned above is archive page of post type "therapies", there is a known issue when you put a taxonomy view into WordPress archive: the content template in taxonomy view won't work as expected, see the errata here:
https://toolset.com/errata/views-shortcodes-return-empty-output-after-ajax-pagination-triggering-in-a-taxonomy-view/
The workaround for now:
avoid using a content template in the Views Loop editor and instead add your content directly in the Loop editor.
If you need more assistance for it, please provide a test site with the same problem, I need to debug it in a live website.
Thanks for the details, I can log into your website and see the problem, I have done below modifications in your website,
Edit the post view
hidden link
in section "Query Filter", change the filter from:
Select posts whose parent is the page where the View is shown.
To:
Select posts with taxonomy:
Types of Therapies set by the parent Taxonomy View
Please test again, check if is fixed, thanks.
More help:
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/
Thanks for your help Luo. Our issue is resolved now. Have a great day/night!