Popular Location (Count), exclude count 0

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

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

Open Support Ticket
  • Author
    Posts
  • #10741

    purpleedge
    Expired Member
    Post count: 539

    Just wondering how hard it would be to add a count of listings to the Popular Location widget and, add an option to exclude locations with a zero count, and add a limit to how many are displayed, sorted by descending count?

    I have 74 default locations, most of which have no listings at this stage, so it makes sense to me to show the number of listings per location, and only show the top 5 locations with listings – ala “Popular” location!

    I can probably figure it out myself, but any tips appreciated!

    I’m trying to avoid things like this…

    http://wpgeo.directory/all-locations/

    ->

    http://wpgeo.directory/location/australia/

    Zero listings! PIA!

    #10742

    purpleedge
    Expired Member
    Post count: 539

    In my case, I want to display it on the Listings page and it looks like it would be the same data that gets displayed in the listings map, so maybe there is existing code that can be used?

    #10805

    Simone
    Expired Member
    Post count: 3515

    Hello, I think the right direction is to edit the geodir_location_widget.php in the geodir_location_manager folder.
    You could play with the array with the item no_of_records which I suppose it will output the count, but i’ll leave the final words to Vikas 🙂

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