Skip Navigation

[Resolved] “View” Sort function is working for “Ascending” but not for “Descending”

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

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 3 years, 8 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 – 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 2 replies, has 2 voices.

Last updated by andersP 3 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#2210153

I am trying to:
Sort custom post "projects" using a "View"
Link to a page where the issue can be seen:
hidden link
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

Languages: English (English )

Timezone: 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!