Business Listings Counter, filtered by location
This topic contains 13 replies, has 3 voices, and was last updated by Diego Entraigues 7 years, 6 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
March 12, 2018 at 9:23 pm #421256
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.
March 13, 2018 at 9:41 am #421298Try adding ‘gd_location’ => true,
$query_args = array( 'post_type' => 'gd_place', 'gd_location' => true, );March 13, 2018 at 10:18 am #421313Hi,
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 locationfunction 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.
March 15, 2018 at 1:18 pm #421586Hello 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.
March 15, 2018 at 4:58 pm #421615There is no option for that, i could give you the SQL but you would need to implement that yourself somehow.
Stiofan
March 17, 2018 at 4:00 pm #421915Hello 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.
March 17, 2018 at 5:43 pm #421924Hello,
Please post your site URL and WP Admin details and we will take a look.
March 17, 2018 at 8:49 pm #421935This reply has been marked as private.March 18, 2018 at 9:35 pm #422005I 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.
April 3, 2018 at 6:25 am #424691Hello,
Do you remember me?
Can you tell me something about my incidence?Thanks.
April 3, 2018 at 11:43 am #424761I though i had replied here, i could not get your site to load.
Is it live yet?Stiofan
April 4, 2018 at 7:00 am #424881This reply has been marked as private.April 4, 2018 at 5:34 pm #424970Hello,
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
April 6, 2018 at 6:31 am #425216Hi 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.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket