Passer la navigation

[Résolu] “View” Sort function is working for “Ascending” but not for “Descending”

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
The issue here is that the view frontend sorting option isn't working correctly with the WP Ulike plugin custom field like_amount

Solution:

The sorting is in fact working as per the value that is stored within the field. The problem was that the [wp_ulike_counter] shortcode was displaying the incorrect value that is being stored within their custom field.

This support ticket is created Il y a 4 years, 8 months. 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 -

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

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

Dernière mise à jour par andersP Il y a 4 years, 8 months.

Assisté par: Shane.

Auteur
Publications
#2210153

I am trying to:
Sort custom post "projects" using a "View"
Link to a page where the issue can be seen:
lien caché
I expected to see:
I have 2 sort options. "Post Date" and "Field like_amount" using the WP ULike plugin.
Instead, I got:
Sort using "ascending" for the likes amount works fine but the "descending" does not work for likes amount. The "score" listed beside each project shows the likes amount so you clearly see the problem.
Thank you.

#2210219

Shane
Supporter

Les langues: Anglais (English )

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

Hi Anders,

Thank you for getting in touch.

The view is actually sorting correctly. The problem is the [wp_ulike_counter] shortcode displaying the incorrect information for the "A Helping Hand" post.

If you take a look you'll notice that i've added the [wpv-post-field name='like_amount'] shortcode on the view and it is now displaying the actual value that is stored within the custom fields. This is what is being used to sort the view.

Not sure why the [wp_ulike_counter] shortcode is displaying the incorrect value.

Thanks,
Shane

#2210221

My issue is resolved now. Thank you!