Your address will show here +12 34 56 78

Home Forums WP RESIDENCE – Real Estate WordPress Theme FORUM Where is the code that sets advanced search results order in wpresidence (custom search version)

This topic contains 0 replies, has 1 voice, and was last updated by  Anna 1 year, 10 months ago.

  • Author
    Posts
  • #123469

    Anna
    Keymaster

    In searchfunctions.php, function

    wpestate_search_results_custom()

    around line 312.

    You have to change these parameters

    'meta_key' => 'prop_featured',
    'orderby' => 'meta_value',
    'order' => 'DESC',

    With you new order parameters. See this link also
    https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

    Also in advanced_Search_results.php you may need to remove the filters at line 96 : add_filter( ‘posts_orderby’, ‘wpestate_my_order’ );

You must be logged in to reply to this topic.