Skip Navigation

[Resolved] Display hierarchies

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 1.58 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by johnh-18 5 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1181381
views.jpg

Three questions related to a view and what the view display on the page. I have attached an image where I have marked the areas for each question.

You can also view the following page - hidden link

The site is password protected and login details are
username: tga
pw: Krit@45

1.
It is possible to get the views shortcode used for the headline to only include the last part of the hierarchical taxonomy from the URL, ie in this case the headline should read ‘Properties for sale in Menton’?

2.
How can I get the taxonomy to appear in hierarchical order (ie France, French Riviera, Menton) instead of in alphabetical order?

3.
Related to question 1 – how can I get the view to only display properties coded with the last part of the hierarchical taxonomy from the URL, ie in this case only display properties in Menton (in the example, only the first property as the other two are not tagged as Menton in the hierarchical taxonomy?

#1181402

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

1.
It is possible to get the views shortcode used for the headline to only include the last part of the hierarchical taxonomy from the URL, ie in this case the headline should read ‘Properties for sale in Menton’?
=> Well - to display the current archive title - you should use the shortcode:

[wpv-taxonomy-archive info="name"]

More info:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-taxonomy-archive

2.
How can I get the taxonomy to appear in hierarchical order (ie France, French Riviera, Menton) instead of in alphabetical order?
=> Do you mean that you want to display it:

France
—  French Riviera
— — Menton

If yes - there is no such feature.

3.
Related to question 1 – how can I get the view to only display properties coded with the last part of the hierarchical taxonomy from the URL, ie in this case only display properties in Menton (in the example, only the first property as the other two are not tagged as Menton in the hierarchical taxonomy?
=> You need to add correct query filter. I've added following query filter to your view's query filter section.

Taxonomy filter  Edit    Delete
Select posts with taxonomy:
Property locations the same as the current archive page

You should check and confirm:
=> hidden link

#1182205

Hi Minesh,
Thank you very much for your response - and not least for also implementing the solution -- much appreciated.
Regarding question 2, I think we are saying the same thing although the example I included is not the best as it turns out OK as the alphabetical order is correct by default in that example. A better example would be searching for a property in Antibes, French Riviera, France and using this shortcode - [wpv-post-taxonomy type="property-location"] - the text reads Antibes, France, French Riviera, ie in alphabetical order and not in the (reversed) hierarchial order which is Antibes, French Riviera, France (town, region, country). But I think you understood what I meant and therefore assume it is not possible. Having said that, even if it is not an included feature, would a developer who is working with toolset be able to make it happen? Or is it technically impossible?
Have a nice weekend / john