Skip Navigation

[Closed] Order by taxonomy and custom field

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

Our next available supporter will start replying to tickets in about 2.23 hours from now. Thank you for your understanding.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 8 replies, has 2 voices.

Last updated by Shane 3 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#2035501

Hi,
into a view is it possible to sort (from backend or from functions.php) for a taxonomy and for a custom field?
Regards

#2035635

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

Thank you for getting in touch.

I'm not quite sure what you mean. Are you referring to sorting the list of terms on the backend or are you referring to the frontend ?

Please let me know.

Thanks,
Shane

#2035637

Hi Shane,
into frontend?
Thanks

#2035921

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2021-04-28 at 1.43.25 PM.png

Hi David,

If you are displaying your terms using a view then it is possible to sort the taxonomy based on the their custom meta.

How are you displaying the taxonomy on the frontend? Please provide this so that I can best advise you on how to achieve this.

If you're using a shortcode to display the taxonomies of the post then you won't be able to sort them by their custom meta.

Given that your initial post mention that you are using a view, then under the Ordering setting you should be able to see the custom meta options for sorting. see my screenshot.

If you're not seeing this please let me know, also please provide a screenshot of what you are seeing.

Thanks,
Shane

#2036045

Hi Shane,
into my list doesn't show any terms.
Send me private link for WordPress login.
Thanks!

#2036069

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

I've enabled the private fields for your next response. Please also send me the link of the page as well.

Thanks,
Shane

#2042773

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

Thank you I had a look at the view. In a case like this you won't be able to sort by the taxonomy custom fields mainly because the view you linked me to is a Post View Not a Taxonomy View.

You can only sort the view by the taxonomy custom fields if the view is a Taxonomy view. I hope I was able to clear this up for you.

Is it that you want to order the posts that a being displayed by the order of the custom taxonomy fields ? In this case I would recommend looking into nesting your views .

Here is a link to our Legacy feature for views on how to nest the views.
https://toolset.com/documentation/legacy-features/views-plugin/using-a-child-view-in-a-taxonomy-view-layout/#taxonomy-view-with-a-post-view-for-a-child

In the Taxonomy Parent view you can order the terms by their custom fields and then this will order the posts in the child Post view based on the parent term's order.

Please let me know if this helps or if further clarification is needed.

Thanks,
Shane

#2053985
Schermata 2021-05-13 alle 12.40.36.png
Schermata 2021-05-13 alle 12.39.20.png

Hi,
I think that my issue is simple: in the view I want dont'have the value "all" (in my screen at front-end it's named "Tutte le Riviste") but I want have the view filtered by the first taxonomy, so "Il Servizio Trasfusionale 1 2021", is it possibile? In other words I want dont'have the default view results not filtered...

Thanks, best regards
Datt

#2054193

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

You're saying that when the user visits the page for the first time you want the view to get automatically filtered by a single taxonomy ?

Also the site that you previously provided no longer works so a new link may be required.

Thanks,
Shane

The topic ‘[Closed] Order by taxonomy and custom field’ is closed to new replies.