Your address will show here +12 34 56 78

Home Forums WP RESIDENCE – Real Estate WordPress Theme FORUM How to hide the number of properties next to each category from advanced search in WP RESIDENCE

This topic contains 4 replies, has 4 voices, and was last updated by  isusovac 2 years, 7 months ago.

  • Author
    Posts
  • #100018

    Anna
    Keymaster

    Hi Anna,

    With site has large of number properties, it’s very good when show number of properties on Advanced Search. But with new site maybe not good for see!

    https://imagizer.imageshack.us/v2/454x336q90/901/i9pU8v.png

    So, Would you mind if tell me how to hide these?

    ——–

    Solution before 1.12 theme version

    In help-functions.php at line 862 there are 4 functions

    wpestate_get_action_select_list, wpestate_get_category_select_list, wpestate_get_city_select_list and wpestate_get_area_select_list.

    In each function you have something like

    ('.$tax_term->count.')'.'

    remove it from all functions

    FireShot Screen Capture #1169 - 'Edit Themes ‹ Samplea — WordPress' - samplea_wpresidence_net_wp-admin_theme-editor_php_file=libs_help_functions_php&theme=wpresidence

    After this remove the  below code from all functions

    ('.$categ->count.')'.'

    How to hide number

    ——–

    Solution after 1.12 theme version

    If you want to remove that information you need to change several functions all located in help_functions.php

    wpestate_hierarchical_category_childen

    wpestate_get_action_select_list

    wpestate_get_category_select_list

    wpestate_get_city_select_list

    wpestate_get_area_select_list

    wpestate_get_county_state_select_list

    for wpestate_hierarchical_category_childen , at line 1735 remove this piece of code (‘.$counter.’)

    Same piece of code needs also to be removed from all the above functions

    for ex on wpestate_get_action_select_list

    you have

    $categ_select_list .= ‘<li role=”presentation” data-value=”‘.$categ->slug.'”>’. ucwords ( urldecode( $categ->name ) ).’ (‘.$counter.’)’.'</li>’;

    and you need to remove (‘.$counter.’)  (is at the end of the string and appears 1 time per function)

    Thanks
  • #103771

    lexuspro
    Participant

    In categories other code
    line 1184

    $categ_select_list     .=   '<li role="presentation" data-value="'.$categ->slug.'">'. ucwords ( urldecode( $categ->name ) ).' ('.$categ->count.')'.'</li>';
    

    after removal of the code is still number remain 🙁
    ('.$categ->count.')

  • #103820

    aromboli
    Participant

    I have the same problem. I managed to get rid of all the numbers but categories still show the count.

  • #103959

    Anna
    Keymaster

    Hi guys

    We did the screenshots and made the changes ourselves to test for you. It’s updated here http://wpestate.org/forums/topic/how-to-hide-number-from-each-field-on-advanced-search/

    Thanks
    Anna

  • #104321

    isusovac
    Participant

    Hi Anna,

    Can You please advise me how to acieve the opposite, i would like to get the count of properties in a specific Neighborhood. How to get the count based on the name of the neighborhood which i extracted..? This number would not be shown on a page which has advanced search on it.. Do I have to create a new function or can I use an existing one like: pestate_get_county_state_select_list ?

You must be logged in to reply to this topic.