Navigation überspringen

[Gelöst] order taxonomy output by slug

This support ticket is created vor 4 Jahre, 10 Monaten. 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.

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

Zeitzone des Unterstützers: Asia/Hong_Kong (GMT+08:00)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Luo Yang vor 4 Jahre, 10 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#1812935
Screen Shot 2020-10-15 at 1.29.18 PM.png

I' using the following shortcode to list taxonomy terms related to a post within a view.

[wpv-post-taxonomy type='offering' format='name' separator=' • ']

I'd like them to order by slug instead of title. Is there a way to do this?
I've tried order='slug' orderby='slug' etc...

#1813557

Hello,

Please check our document:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-taxonomy
The shortcode [wpv-post-taxonomy] do not have attribute "orderby".

As a workaround, you can create a taxonomy view:
- Query "offering" taxonomy terms
- Filter by:
Taxonomy is set by the current post
- Order by Term slug ASC
- In view's loop, display the term's information

Then use above taxonomy view's shortcode to replace the shortcode [wpv-post-taxonomy]