GeoDirectory SupportShow All Listings on Map – GeoDirectory Support https://wpgeodirectory.com/support/topic/show-all-listings-on-map/feed Fri, 26 Dec 2025 01:24:34 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-16448 <![CDATA[Show All Listings on Map]]> https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-16448 Wed, 24 Sep 2014 21:00:05 +0000 jonahcoyote Hi there,

Is there a way to show all listing on the map besides showing all posts per page? It might be nice to have both options so that some users can only show listings in the map that are on the current page, and another option to show all listings on the map regardless of how many listings are showing per page…

Thanks,
Jonah

]]>
https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-16449 <![CDATA[Reply To: Show All Listings on Map]]> https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-16449 Wed, 24 Sep 2014 21:01:25 +0000 jonahcoyote If anybody is wanting to adjust how many listings are shown per page or get it so the map will show all listings, just add this code to your themes functions.php file:



/*-------------------------------------------------------------------------------
	Show More Posts Per Page
-------------------------------------------------------------------------------*/
function show_more_posts($query) {
	if ( empty( $query->query_vars['suppress_filters'] ) ) {
		if( geodir_is_page('listing') || geodir_is_page('author') || geodir_is_page('search') ) {
			$query->set( 'posts_per_page', -1 );
		}
	}
	return $query;
}
add_filter( 'pre_get_posts' , 'show_more_posts' );

That will affect listing, search and author GD pages.

]]>
https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-16574 <![CDATA[Reply To: Show All Listings on Map]]> https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-16574 Thu, 25 Sep 2014 19:16:00 +0000 Paolo Thx for that.

Just FYI, if you have several hundreds listings in any given category, with this snippet, the map could take much longer than the rest of the page to load.

Cheers,

]]>
https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-16575 <![CDATA[Reply To: Show All Listings on Map]]> https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-16575 Thu, 25 Sep 2014 19:17:24 +0000 jonahcoyote No problem. Any thoughts on my question/suggestion/request to be able to show all listings on the map without my code though?

]]>
https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-16577 <![CDATA[Reply To: Show All Listings on Map]]> https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-16577 Thu, 25 Sep 2014 19:27:56 +0000 Paolo I see three is note about it in our “improvements” to do list.

We eventually want to change the way map markers are queried, moving the ajax calls in a separate file. This to be able to fetch them quicker and to be able to cache them too.

When we will get to it, we will be able to also add options to display more markers in the map.

Can’t tell today how soon this will be done.

Thx

]]>
https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-16680 <![CDATA[Reply To: Show All Listings on Map]]> https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-16680 Fri, 26 Sep 2014 17:00:08 +0000 jonahcoyote Sounds good paolo, thanks!

]]>
https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-18598 <![CDATA[Reply To: Show All Listings on Map]]> https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-18598 Thu, 16 Oct 2014 17:21:06 +0000 Wayne Harvey Hi there, I’m also looking to have the map on the listing pages show all of the listings. I tried the code provided above on the child theme functions.php file. It’s not working. Any ideas?

]]>
https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-18649 <![CDATA[Reply To: Show All Listings on Map]]> https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-18649 Thu, 16 Oct 2014 20:24:27 +0000 jonahcoyote Hey Wayne,

What version of GD are you running? Are you sure you added it to the currently active child theme? Are you seeing any errors or is it just not working?

– Jonah

]]>
https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-18651 <![CDATA[Reply To: Show All Listings on Map]]> https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-18651 Thu, 16 Oct 2014 20:32:59 +0000 Wayne Harvey Hi Jonah
Thanks for the quick reply. I’m running the latest version of GD (1.2.4) and have definitely added it to the active child theme. My funtions.php file has one other customization that is functioning. There are no errors, the listing pages just continue to load 5 listings only as before – not sure if there is a setting to change that at all but I am looking for a method to just load all listings on the map. Cheers!

]]>
https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-18653 <![CDATA[Reply To: Show All Listings on Map]]> https://wpgeodirectory.com/support/topic/show-all-listings-on-map/#post-18653 Thu, 16 Oct 2014 20:56:17 +0000 Paolo To show more listing in the list go to wp Settings >> Reading and change the number of visible posts.

Thx

]]>