Skip Navigation

[Resolved] How to list taxonomies with recent posts?

This support ticket is created 6 years, 12 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.

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)

This topic contains 2 replies, has 2 voices.

Last updated by morktron 6 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#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