I want to show screenshot 1 (Taxonomy term image field inside parent 'caravan park' CPT)
hidden link
In
Screenshot 2 (Child post 'Holiday Homes' CPT archive page)
hidden link
On the caravan park page, the images are output via a view.
Many thanks for your help!
Hello,
In the 'Holiday Homes' child CPT archive page, you can create a taxonomy view and display the Taxonomy term.
For example:
1) Dashboard-> Toolset-> Settings-> General
in section "Editing experience", enable option "Show both the legacy and Blocks interface and let me choose which to use for each item I build"
2) Dashboard-> Toolset-> Views
Create a taxonomy view:
- Query terms of your custom taxonomy
- In view's loop display term's information
3) Edit 'Holiday Homes' child CPT archive page, display above views.
Hi Luo,
Apologies for bothering you again, but thank you for your time.
I tried this already (screenshot 2), however, I think the problem I am having is, because I am showing this on my child archive page, the parent taxonomy images are not showing.
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-post-body view_template="loop-item-in-site-features-taxonomy-images-holiday-home-archive"]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
I also tried to use a nested view (screenshot 1), which had the above view inside another view which was filtered by relationship and that didn't work either.
[wpv-layout-start]
[wpv-items-found]
<center>[wpv-view name="site-features-taxonomy-images"]</center>
<!-- wpv-loop-start -->
<wpv-loop>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"][/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
Or am I reading your reply wrong?
Honestly, as I've tried a few different ways, I think I've confused myself and now I am confusing you.
Please provide your website credentials in below private message box, also point out the problem page URL and view URLs, I need to test and debug it in a live website, thanks
I assume we are talking about this taxonomy view "Site Features Taxonomy Images (Mobile)":
hidden link
You are going to display above taxonomy view outside WordPress archive loop, this is a known issue, see the erratum:
https://toolset.com/errata/content-template-is-not-rendered-if-added-outside-the-archive-loop-of-a-view/
Toolset lets you style WordPress archives. You can insert anything in the Loop Editor of those archives including Content Templates.
However, there are two cases where Content Templates will not display:
If you insert Content Templates outside the wpv-loop HTML tags.
Please try the workaround mentioned in above erratum:
The recommended workaround is to not use Content Templates to group fields in a Taxonomy View.
Display them directly, without content template.
Hi Luo,
I am a little confused.
This hidden link
is within the wpv-loop HTML tags. Please take a look at the code;
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<h4>Site Facilities</h4>
<wpv-loop>
[wpv-post-body view_template="loop-item-in-site-features-taxonomy-images-mobile"]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"][/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
Then I want to place it within the archive loop (screenshot 4)
hidden link
As far as I can see, I am trying to place this information into a loop.
If I am wrong I am sorry, if I am right, I think I may have confused you and I am again sorry for that!
Thank you for your help
I did something similar, but this was on the same CPT archive where the information is stored (screenshot 5)
However, I want this information to show on the Child CPT archive page as well.
I am checking it in your website, will update here if find anything
I have done below modifications in your website:
1) Create a content template "Caravan Parks information":
hidden link
Display the taxonomy view shortcode:
[wpv-view name='site-features-taxonomy-images-mobile']
2) Edit the WordPress archive:
hidden link
In the loop, display above content template shortcode:
[wpv-post-body view_template="caravan-parks-information" item="@caravan-park-park-stock.parent"]
Test it in front-end:
hidden link
It works fine, please check if it is fixed, thanks
My issue is resolved now. Thank you!