1. Home
  2. Design
  3. GD > Listings

GD > Listings

GD Listings is used to show a list of listings. It is the most powerful shortcode for this purpose.

Here’s an overview of when not to use GD Listings

Archive or Search Template

Use GD Loop on Archive and Search templates. You can still use GD Listings in the template, but use it only to show a select group of listings like “Featured” or “Latest” above or below GD Loop. GD Loop, when used on the archive or search page templates will show all the relevant listings.

Displaying Linked Posts

Use GD Linked Posts instead. GD Listings doesn’t have options to display linked posts.


Basic Options

The basic settings for GD Listings include a place where you can write the title.
Also shown is a red arrow pointing to the button that will reveal the advanced settings.

Advanced Options

Post Limit

  • The Post Limit sets how many total listings you want to show, if you are not using paging. If you are not using paging, then listings over this limit will not be shown at all.
  • If you are using paging, then Post Limit sets how many listings are shown per page.
  • Example: there are 100 listings that meet the criteria set in your shortcode options. With Post Limit to 2 and no pagination, just 2 listings will show. If pagination is used, then there would be 50 pages.

Enable Location Filter

  • Location Page – GD Listings on the Location page requires this setting in order to show listings “IN” the location. When this settings is enabled, and the page URL is /location/country/ it will show ALL the listings in that country as specified in the options.
  • Detail Page – GD Listings with this setting on the detail page will show all the listings IN the same city as the listing being viewed. Use the Sorting->Nearby to list those listings closest first.

Sorting Options


Each GD Listing element can have an individual sort order. The default sorting options for GD Listings are;

  • A-Z
  • Latest
  • Most reviews
  • Highest rating
  • Random
  • Distance to current post (details page only)

Custom Sort options
You can create your own sorting options under CPT > Settings > Sorting, once you add your own sorting options they will then appear in the list of available sort options in the widget.


Nearby Listings with GD Listings and “Sort by -> Distance to…” on the Details page

GD Listings can be used to show ‘nearby’ listings on the details page with the following option:

If you want to show listings that are in the same city only, use the option for “Enable location filter” or the param:

[gd_listings title="Nearby" post_type="gd_place" related_to="default_category" sort_by="distance_asc" title_tag="h3" layout="0" post_limit="5" category="0"]

If you have added GD Post Distance to the relevant Archive Item template then the distance will be shown. This goes nicely with the gd_post_directions, too.


Daily Random Listing

Display a single random listing “Listing of the day!”

[gd_listings post_limit="1" sort_by="random" layout="1"]

“Random” is locked for 24 hours by default to improve performance.


Random Sorting

A random sort order is applied for 24 hours, then resorted again. You can change the 24 hour interval to something different with this snippet.

function _my_geodir_rand_seed($rand_seed){
$rand_seed = get_transient( ‘geodir_rand_seed_custom’ );

		// if we don’t have a transient then set a new one
			$rand_seed = time();
			set_transient( ‘geodir_rand_seed_custom’, $rand_seed, 4 * HOUR_IN_SECONDS );

		// validate
		$rand_seed = absint($rand_seed);

    return $rand_seed;
Was this helpful to you? Yes 2 No 3