I am trying to create a ‘view’ that include elements from a hierarchal taxonomy have problems both with the structure, ie showing the right content as well as the formatting / layout.
The taxonomy in question is called ‘property locations’ and is built on a 3-level hierarchy
Level 1 - Country
Level 2- City/ Region
Level 3 - Town/suburb/village
Please see attached visual for layout and content
In the visual, there are two links highlighted in red, Link A and Link B, which correspond to the following two links which are single pages in the CPT ‘properties for sale’
A - hidden link
B - hidden link
The idea is to place the view in the following single page in the ‘Destinations’ CPT
hidden link
Alternatively, if it for any reason is easier or makes more sense from a structural point of view to place it in separate pages (one for each country), that is also OK - eg
hidden link
I hope the above info is clear and sufficient but please do let me know if you need any further info.
Hello,
Please elaborate your questions with more details, I have tried the URL mentioned in your screenshot:
hidden link
It seems to be WordPress archive page for post type "property-for-sale".
If it is, above archive page is designed to display "property-for-sale" posts, and you can customize it with Views WordPress archive by following our document:
https://toolset.com/documentation/user-guides/creating-wordpress-custom-post-archives/
According to your screenshot:
hidden link
It seems you are going to display terms of taxonomy "property locations".
If it is, that will conducts other problems, since above post type archive page is not designed for display terms of taxonomy "property locations".
In your case, you might consider create another normal wordpress page, display a nested view:
1) Parent taxonomy view display top-level terms of taxonomy "property locations":
- query terms of taxonomy "property locations"
- filter by:
Select taxonomy terms whose parent is None.
- in view's loop display:
a) The term's information (term's image field)
b) below child view:
2) Child taxonomy view
- query terms of taxonomy "property locations"
- filter by:
Select taxonomy terms whose parent is the value set by the parent view.
- in view's loop display:
The term's information
Dear Luo,
Thank you for your quick response.
By following your advice to create another normal wordpress page and display a nested view I think the problem is more or less solved apart from a bit of styling - see hidden link or hidden link
There are however 2 remaining issues
a/ how to get the text to sit next to the image - see attached screen shot. I have tried to figure out how to create a bootstrap grid but have not been successful
b/ creating a page for each country is not a problem but what would be good is if there is a way to dynamically link the country page with new level 2 locations taxonomies, ie cities/regions. They way the page is built (Taxonomy is set by the page where this View is inserted) , I will have to go to the country page and manually tick the new city / region taxonomy every time a new city / region is added. Not a huge problem but great of there is a way to do it dynamically.
Best regards / john