Business Listings Counter, filtered by location

This topic contains 13 replies, has 3 voices, and was last updated by  Diego Entraigues 6 years, 8 months ago.

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

Open Support Ticket

Tagged: ,

  • Author
    Posts
  • #421256

    Diego Entraigues
    Free User
    Post count: 7

    Hello,
    I’ve already read this post, and almost works for me.

    Is any way to add a location filter to that snippet?

    I tried whit the snippet from the post i’ve mentioned, but it always shows me the total of posts.
    // Add number of listings
    function listing_count(){
    $query_args = array(
    ‘post_type’ => ‘gd_place’,
    );
    return geodir_get_widget_listings($query_args, true);
    }
    add_shortcode(‘listingcount’, ‘listing_count’);

    I just need to show how many results users found, on the top of the search page. And if they change city, it would change the number of results founded, according to the number of posts from the city they selected.

    Thanks.

    #421298

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Try adding ‘gd_location’ => true,

    
    
    $query_args = array(
    'post_type' => 'gd_place',
    'gd_location'    => true,
    );
    #421313

    Diego Entraigues
    Free User
    Post count: 7

    Hi,
    I’ve tried what you suggested, but it doesn’t works. Still showing the total number of gd_place.

    I’m trying to add this shortcode via snippet on the home and search pages.

    My snippet:
    // Add number of listings filtered by location

    function test_listing_count(){

    $query_args = array(
    ‘post_type’ => ‘gd_place’,
    ‘gd_location’ => true,
    );
    echo geodir_get_widget_listings($query_args, true);

    }

    add_shortcode(‘testlistingcount’, ‘test_listing_count’);

    Thanks for your help.

    #421586

    Diego Entraigues
    Free User
    Post count: 7

    Hello again,

    Any idea of how could i get a counter of how many listings is showing the gd_home and search pages?

    I saw that the cpt categories widget does it, but it shows a sepparately count for each category.
    If it was possible to obtain a total counter on that widget, it also could works to mee.

    Thanks.

    #421615

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    There is no option for that, i could give you the SQL but you would need to implement that yourself somehow.

    Stiofan

    #421915

    Diego Entraigues
    Free User
    Post count: 7

    Hello again,

    I tried a different way to achieve what i need.
    I’ve created a Place tag. I put the tag in all my places (csv import).
    I used the widget “wp tags cloud”. But the count it allways shows 0.
    At the backend, the place tag i created it shows 3024 places with that tag. At the frontend, places are showing the correct tag. But the tags cloud’s count still shows 0.

    Any idea of what it’s wrong?

    Thanks.

    Diego.

    #421924

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    Please post your site URL and WP Admin details and we will take a look.

    #421935

    Diego Entraigues
    Free User
    Post count: 7
    This reply has been marked as private.
    #422005

    Alex Rollin
    Moderator
    Post count: 27815

    I have flagged this for the developers to let us know if they have some advice for you.

    Thanks for your patience, they will be with you asap.

    #424691

    Diego Entraigues
    Free User
    Post count: 7

    Hello,
    Do you remember me?
    Can you tell me something about my incidence?

    Thanks.

    #424761

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I though i had replied here, i could not get your site to load.
    Is it live yet?

    Stiofan

    #424881

    Diego Entraigues
    Free User
    Post count: 7
    This reply has been marked as private.
    #424970

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    The tag cloud logic is completely within WordPress, not GD. I tried but could not recreate this using latest WP and GD and the cloud works fine for me.

    You can try the GD tools at GD – GD Tools – Sync GD Categories

    #425216

    Diego Entraigues
    Free User
    Post count: 7

    Hi Alex,

    Thanks for your answer.

    Can you tell me why the Sync GD Categories, if i’m using tags, not categories?

    Thanks again.

    Regards.

    Diego.

Viewing 14 posts - 1 through 14 (of 14 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