Skip Navigation

[Resolved] Can’t figure out a way to create a View ordered by Freshness (using bbPress)

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to order by the bbPress "freshness" field?

Solution:
The field is a hidden field, i.e. the key begins with an underscore: _bbp_last_active_time

To be able to use hidden fields in Views you must expose them at Toolset > Settings > Front-end Content, using the first section to choose which hidden fields you want to make available in the Views GUI for filtering etc.

This support ticket is created 6 years, 5 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by darioS-2 6 years, 5 months ago.

Assisted by: Nigel.

Author
Posts
#1109407

I am trying to: create a view ordered by freshness, not last modified post, but ordered by last reply (freshness in bbPress).

Link to a page where the issue can be seen: not yet available, i'm just testing locally for now.

I expected to see: after installing bbPress I expect to see the term Freshness added to the list of available sorting options

Basically I need the ability to choose a "meta_value" for ordering, from which I can pick the "meta_key" from the bbPress native keys: "_bbp_last_active_time". This method is already used in the native bbPress loop:

// Setup recent topic query vars
$post_vars = array(
'post_parent' => $forum_id,
'post_type' => bbp_get_topic_post_type(),
'meta_key' => '_bbp_last_active_time',
'orderby' => 'meta_value',
'numberposts' => 1
);

thanks in advance!

#1109427

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

Meta keys which begin with an underscore are hidden.

You need to go to Toolset > Settings > Front-end Content and use the first section to choose which hidden fields you want to make available in the Views GUI for filtering etc.

#1109440

Thank you Nigel! That's great!
I think that this is going to solve my problem!

have a nice day 🙂