Forums

  1. hongyu
    Member
    Posted 2 years ago #

    hi, i have prob with sort code, you can see from my site, the order By section is acting as defalt.
    this is my link:
    http://citybeeshops.info/homesearch/all-properties/
    and this is the code i m using:
    [property_overview sorter=on sort_by=price sort_order=DESC pagination=on]

    thx,
    LIllian

    http://wordpress.org/extend/plugins/wp-property/

  2. Andy Potanin
    Member
    Plugin Author

    Posted 2 years ago #

    Visit your Settings page, Developer tab, find the "Price" attribute, and check "Sortable'.

    You have to specify to WPP which attributes are sortable first, otherwise it won't include them in the dropdown, as in your case.

  3. mhawksey
    Member
    Posted 2 years ago #

    I've made price sortable and searchable but have a problem when I sort by price. I think it might be the way my SQL is configured because when in phpmysql admin if I:

    SELECT * FROM wp_postmeta WHERE meta_key LIKE 'price' ORDER BY ABS(meta_value) ASC

    it orders by a string comparison so the table will go:

    245000
    25000
    280000

    To get a sort by numeric value I need to cast the meta_value as ABS e.g.

    SELECT * FROM wp_postmeta WHERE meta_key LIKE 'price' ORDER BY ABS(meta_value) ASC

  4. mhawksey
    Member
    Posted 2 years ago #

    oops upgrade to latest version 1.14 and this is fixed

  5. latte62
    Member
    Posted 1 year ago #

    I am having a problem with price sort. When I select price sort, the screen updates and says 0 items found. I am going to look in the mysql and see if that helps. I will update when I know more.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic