Number of Listings in Popular Categories

This topic contains 2 replies, has 3 voices, and was last updated by  Paolo 10 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #17574

    laevents
    Expired Member

    thanks for the great product, how may I hide number of the listings under categories, here is an example,

    http://wpgeo.directory/hotels/

    1 Star (2) 3 Stars (3) 4 Stars (3) 5 Stars (5) Hostel (2)

    I would like to show it like,

    1 Star 3 Stars 4 Stars 5 Stars Hostel

    Please advise.

    Thanks,

    #17588

    Guust
    Moderator
    Post count: 29970

    Not sure that is possible.
    The problem with that too is that you will get a lot of links that will go to empty pages once people browse to a location.
    For example, see
    http://wpgeo.directory/hotels/australia/new-south-wales/millers-point/

    Imagine that the zeros would not be there, would be annoying for visitors?

    #17652

    Paolo
    Site Admin
    Post count: 31211

    To get rid of the number if you wish to do so anyway, you need to copy the entire widget function to create a new widget. From geodirectory/geodirectory-widgets/geodirectory_popular_widget.php from line 2 to line 140, paste it in your child theme functions.php, rename it and modify its code.

    to remove the category count, go to line 70 and replace this:

    
    
    
    echo ucwords( $cat->name ) . ' (<span class="geodir_term_class geodir_link_span geodir_category_class_' . $post_type . '_' . $cat->term_id . '" >' . $total_post . '</span>) ';

    with this

    echo ucwords( $cat->name );

    Thx

Viewing 3 posts - 1 through 3 (of 3 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount