Sauter la navigation

[Résolu] shortcode orderby attribute

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

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)

Marqué : 

Ce sujet contient 4 réponses, a 2 voix.

Dernière mise à jour par leeR-6 Il y a 5 années et 1 mois.

Assisté par: Shane.

Auteur
Publications
#1406099

On lien caché

I have this shortcode:

{!{wpv-view name='show-members' cat='museums' orderby="wpcf-museum-order" order="desc"}!}

I want to sort the results based on the custom field: wpcf-museum-order.

It is not working. Am I doing something wrong?

#1406141

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Lee,

Thank you for getting in touch.

Would you mind allowing me to have access to the site to check the view query to see if the sorting parameter is being passed?

The private fields have been enabled for your next response.

Thanks,
Shane

#1407379

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Lee,

Thank you for the credentials.

What I would like for you to do is to update our views plugin to the latest version as well as to temporarily disable all the non-toolset plugins to see if the issue still remains.

You have quite a number of plugins installed, any of which could be causing an issue with the sort order of the view.

Thank,
Shane

#1408713

FYI - That wasn't it.

I found the answer on https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-view

'field-xxx'

This works:

{!{wpv-view name='show-members' cat='museums' orderby="field-wpcf-museum-order" order="asc"}!}

Thanks for your help.

#1408717

My issue is resolved now. Thank you!