• Resolved gpirie

    (@gpirie)


    I have added sort by price to the shortcode for WP Adverts. However, it appears to be sorting as a string as the order goes £95, £900, £90, £85, £80…

    Is there a way to sort by price which places the highest number first?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Can you let me know what WPAdverts version are you using? I am checking the sorting on my dev version (with Ads priced at $10, $50 and $100) and the sorting is done properly.

    I also double checked the query and WPAdverts is properly casting the adverts_price meta to a signed number, so it looks like the sorting is being setup correctly in latest WPAdverts core.

    Thread Starter gpirie

    (@gpirie)

    Hi,

    Thanks for getting in touch.

    Currently running Version 1.2.0.

    Plugin Author Greg Winiarski

    (@gwin)

    You will need to upgrade to version 1.2.4, the version 1.2.0 is missing one line in the sorting code which does the string to number casting.

    Thread Starter gpirie

    (@gpirie)

    Thanks, that has solved the problem.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sort by price incorrect’ is closed to new replies.