Your address will show here +12 34 56 78

This topic contains 5 replies, has 2 voices, and was last updated by  Anna 2 years, 9 months ago.

  • Author
    Posts
  • #101427

    Gabriel
    Participant

    Hi,

    After a search, a listing filter option bar is display. It allows to filter depending on properties price and to change display from grid to list.

    How could I add sorting options on Cities or County/State for example ?

    Thanks !

  • #101460

    Anna
    Keymaster

    Hi glemarie

    What you describe would require new coding I am afraid. We added just sorting because that applies for the search results. If you add Cities and Areas – then the idea of filtering just search results will not apply since the search will work for all properties, not just for the search results.

    We have the Properties List which you can use with all the filters available in header.

    Thank you
    Anna

  • #101481

    Gabriel
    Participant

    Hi Anna,

    I did a bit of coding to be able to add sorting criterias by modifying :
    – property_list_filters_search.php
    – ajax_functions.php

    When I select my new filter (property_city) I have a “no results found”. What I don’t understand is that just changing to “price” sorting option I have results. I compared the arrays of arguments for the queries and the only difference is on the sorting options ([meta_query] is the same, not modified) :
    WORKS :
    [meta_key] => property_price
    [orderby] => meta_value_num
    [order] => DESC

    NO RESULTS :
    [meta_key] => property_city
    [orderby] => meta_value
    [order] => ASC

    Is something missing ?

    Thanks for your help

  • #101503

    Anna
    Keymaster

    Hi Gabriel

    Debugging third party code is very difficult. If you know you did the code right, check that the categories titles and slugs are correct.

    When you go to Properties Categories, Actions, Cities and Areas – you have titles and slugs written correctly, meaning they must match. As in this video – http://wpestate.org/wp-residence-taxonomies/

    It’s my best idea. Hope it helps.

    Anna

  • #101510

    Gabriel
    Participant

    I can understand but can you confirm that the two files I modified are the correct ones ?

  • #101513

    Anna
    Keymaster

    Hi Gabriel

    Please open a support ticket here and will ask my colleagues to confirm the files are correct – http://support.wpestate.org/

    Thank you
    Anna

You must be logged in to reply to this topic.