Skip Navigation

[Résolu] How to list taxonomies with recent posts?

This support ticket is created Il y a 6 années et 4 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Marqué : ,

This topic contains 2 réponses, has 2 voix.

Last updated by morktron Il y a 6 années et 3 mois.

Assisted by: Luo Yang.

Auteur
Publications
#594552
toolset-missing-taxonomy-filter.png

Hi, I'm trying to generate a simple list of taxonomy names for any taxonomy that has a recent post - within the last week or month.

I would like to show the list in order of the taxonomy with the newest post first.

I thought it would be easy but if I choose to make a View using taxonomy there is no query filter for dates / time like there is for posts.

I could tell you what I've done so far but it'll only confuse us all, is there an easy way to do this? thanks

#594619

Dear Morktron,

Views plugin is using wordpress class WP_Term_Query to query the terms of taxonomy, see wordpress document:
https://developer.wordpress.org/reference/classes/wp_term_query/__construct/
Parameter: 'orderby'
(string) Field(s) to order terms by. Accepts term fields ('name', 'slug', 'term_group', 'term_id', 'id', 'description', 'parent'), 'count' for term taxonomy count, 'include' to match the 'order' of the $include param, 'slug__in' to match the 'order' of the $slug param, 'meta_value', 'meta_value_num', the value of $meta_key, the array keys of $meta_query, or 'none' to omit the ORDER BY clause. Defaults to 'name'.
There isn't such a built-in feature within Views plugin or WordPress:
show the list in order of the taxonomy with the newest post first.

So it needs custom codes, but you can try to contact our "Toolset Contractors" for it:
https://toolset.com/contractors/

#597002

Ok, thanks, I will hire a PHP developer for this

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.