an
groups-icon

Category Page Sort Options – How to sort by Custom Fields

Wait a minute... This content is very very old. We no longer sell or support this theme version. New Topics
  • Version 9
    0 points
    Beginner

    Hi, I am using the Responsive version of DirectoryPress. I have been having problems getting the Sort to work using Custom Fields. This is when viewing listings within Categories.

    I found some useful forum posts (e.g. https://www.premiumpress.com/forums/topic/problems-with-custom-fields-and-advanced-search-sort-by-options/) but when I try to use the terms suggested I get a blank when trying to sort by the custom field.

    e.g. for a custom field with a database key called hod_daily (numeric, values such as 100)I used the following in General Settings > Advanced Search > Custom Orderby Options:

    Daily Rate (low-high)[meta_key=hod_daily&orderby=meta_value_num&order=asc]
    Daily Rate (high-low)[meta_key=hod_daily&orderby=meta_value_num&order=desc]

    I’ve tried different settings under General Settings > Search Results Settings > Display Order including System Set (no default order) – I’m not sure if that setting is linked to the Orderby options in Advanced Search.

    Basically when I’m in a Category view I can see the various test listings. Sorting by Title etc works ok but as soon as I order by a custom field all listings are removed. The URL is changed when I select one of the custom field sort options – eg goes to: https://domain.com/service-type/categoryname/?meta_key=hod_daily&orderby=meta_value_num&order=asc but no listings are shown(just to clarify I’ve renamed the Listing and Category Slug Names.)

    Can anyone confirm if I’ve done anything wrong or if there are any other settings that might affect this or be required.

    Any help would be much appreciated,

    Thanks

    JL

    January 8, 2014 at 9:56 pm
  • Malgorzata Szalata
    0 points
    Beginner
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    January 8, 2014 at 10:55 pm
  • 0 points
    Beginner
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    January 9, 2014 at 2:26 pm

422

Views

2

Replies