Skip Navigation

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

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.

Marqué : ,

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

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

Assigned support staff: Luo Yang.


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


Luo Yang

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Dear Morktron,

Views plugin is using wordpress class WP_Term_Query to query the terms of taxonomy, see wordpress document:
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:


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