1. Home
  2. GeoDirectory Core
  3. Design Elements Shortcodes

Design Elements Shortcodes



Introduction
Advanced
Shortcode Editor
Elements

GD > Add Listing gd_add_listing
GD >
Archive Item Section gd_archive_item_section

GD > Author Actions gd_author_actions
GD > Best Of gd_best_of
GD > Categories gd_categories
GD > Category Description gd_category_description
GD > Claim Post gd_claim_post
GD > Dashboard gd_dashboard
GD > Event Calendar geodir_event_calendar
GD > Are You Interested geodir_event_ayi
GD > Google Analaytics gd_google_analytics
GD > Linked Posts gd_linked_posts
GD > Listings gd_listings
GD > Location Description gd_location_description
GD > Location Near Me gd_location_near_me
gd_location_switcher
gd_locations
gd_loop
gd_loop_actions
gd_loop_paging
gd_map
gd_map_pinpoint
gd_location_near_me
gd_ninja_forms
gd_output_location
gd_post_address
gd_post_badge
gd_post_content
gd_post_directions
gd_post_distance
gd_post_fav
gd_post_images
gd_post_meta
gd_post_rating
gd_post_title
gd_recent_reviews
gd_recently_viewed
gd_search
gd_single_next_prev
gd_single_tabs
gd_single_taxonomies
Frequently Asked Questions

Introduction

GeoDirectory V2 is brimming over with powerful design elements that you can use to Personlize your site’s Pages and Page Templates.

In this document we list out the GDV2 elements, just to say that there is a list, but the authoritative reference is the GD Shortcode Builder, accessible from within your site where GD is installed.

All of the elements listed below are available as Gutenberg Blocks, Widgets, or Shortcodes.

Advanced Settings

Most elements have additional options that are hidden under a blue settings button.

Shortcode – click the blue button for advanced options.

Gutenberg Block – click the slide option for advanced options.

Widgets – click the blue button for advanced options.

Elements

gd_add_listing

Shows the GeoDirectory add listing form. Advanced settings for specific post type and showing the basic WordPress login form if required.

Example:

[gd_add_listing show_login="1" login_msg="Please use the links to login or register before adding your listing"]

Read More…

gd_archive_item_section

This provides opening and closing sections to be able to wrap output and split the archive item template into left and right.

gd_author_actions

Display author actions. Advanced settings for hiding ‘edit’ and ‘delete’ actions, or for limiting display to the GD author page.

gd_best_of

Shows the best of listings from categories, based on rating.

gd_categories

Shows a list of GeoDirectory categories. Shows categories from a post type when used on a Detail page.
Use on any page or post, or use the advanced options and place in a template page.

The icons shown are based on the following configuration:

  1. Restautant – Category Icon=Silverware, Category Color = Red
  2. Italian – Category Icon=None, Category Color = None
  3. Southern Italian – Category Icon=None, Category Color = White

These settings are available in the CPT – Categories (edit) . See Categories documentation here.

gd_category_description

Display the value of the Category Top Description field, available for each category. See Categories documentation here.

gd_categories can also be used on the GD Detail template, just make sure not to include

no_cat_filter="1"

. If you include that it will show all the categories from the listing CPT, as opposed to the categories assigned to the listing.

gd_claim_post

Displays the GeoDirectory Claim Listing button.
Requires the GeoDirectory Claim Manager Addon: GeoDirectory Claim Manager Addon

gd_dashboard

Shows the user dashboard to logged in users. Provides helpful links for users to add and manage listings, favorites, and invoices from WP Invoicing.

geodir_event_calendar

Displays the events calendar for event post type.
Requires the GeoDirectory V2 Events Manager Addon: GeoDirectory V2 Events Manager Addon

geodir_event_ayi

Displays “Are You Interested?” widget on front end.
Requires the GeoDirectory V2 Events Manager Addon: GeoDirectory V2 Events Manager Addon

GD Post Directions – gd_post_directions

This shows a link to map directions to the current post. Read more

gd_post_distance

Shows the distance do the current post. This element will only display in the Achive Item template in Near search ressults (distance to the location searched) or in gd_listings when sorted by distance.

gd_google_analytics

Show google analytics on detail page. Addon settings for roles will override the shortcode settings; ex. plugin settings grant owner access, but shortcode allows subscribers access. Plugin settings will be used and deny access to subscribers. (Req. Google Analytics addon).

gd_linked_posts

Displays the linked posts. Read more about usage with Custom Post Types here.

gd_listings

Display GeoDirectory listings filtered by your choices. Displays the listing Archive Item template.

gd_location_description

Displays the location description for the current location on location pages. Location pages have a URL that starts with the slug of your location page, often /location/ by default.

gd_location_near_me

Displays near me button to share geo position. Place this on your front page or every page to make it easy for users to go back to a list of nearby listings.

gd_location_switcher

Displays the location switcher.

gd_locations

Displays a list of the city locations.

gd_loop

GD Loop is used on the Archive and Search Archive templates. It will automatically show all the listings from the main WP query for the page according to the URL.

For example, for /places/ it will show all the Places listings.

This is only used on the `GD Archive template` and the GD Search template page. It loops through each post and outputs the `GD Archive Item` template. The Advanced option is for the the layout parameter, used to set how many listings appear per row. ) is for list view which is wide. The others are grid view, 1, 2, 3, 4 or 5 listings per row. These are shown here (only use one!):

[gd_loop layout="0"] (This is the "list" type layout)
[gd_loop layout="1"] (this is for sidebars, will expand to width 100%)
[gd_loop layout="2"] (1-5 are 'grid view')
[gd_loop layout="3"]
[gd_loop layout="4"]
[gd_loop layout="5"]

gd_loop_actions

Shows the archive loop actions such as “Sort” by and “View”. This element is only used on GD Archive template page or the GD Search template page, usually above `gd_loop`.
Removing this from the archive page makes it possible to ‘set’ one layout with gd_loop that is always shown to users on desktop.
Remove with care, though, because it will also remove the sorting options, which may be useful to your visitors.

gd_loop_paging

Shows the pagination links if the current query has multiple pages of results.

gd_map

Display a map. Read more about maps here: https://wpgeodirectory.com/docs-v2/integrations/maps/

gd_map_pinpoint

Shows the distance do the current post.

gd_location_near_me

Displays near me button to share geo position.

gd_ninja_forms

Lets you use a ninja form to send to listings.

gd_output_location

This can be used to output many custom fields in one location. Ofte used on the Detail page sidebar.

GD Post Address – gd__post_address

The shiny new GD Post Address widget gives you control over how the location is displayed. You can use it in a sidebar as awidget, add it as a shortcode in a tab, or even as a block.

The GD Post Address element uses a simple tag scheme to allow you to format the address in almost any manner you might want, including adding arbitrary commas, and even line breaks after each address part.

To use it, just add the GD Post Address element as a widget to your sidebar. Hover over the “i” near the input field to see the detailed instructions shown here:

Enter the address tags as required, adding _br or _brc to the tag adds a line break or comma and line break after it.
Available tags: %%street%% %%neighbourhood%% %%city%% %%region%% %%country%% %%zip%% %%latitude%% %%longitude%% %%br%

To show the entire address:
On one line: %%street%%, %%neighbourhood%%, %%city%%, %%region%%, %%country%%, %%zip%%

gd_post_images

Read more about GD Post Images here.
Example:

[gd_post_images type="image" ajax_load="1" slideshow="1" show_title="1" animation="slide" controlnav="1" link_to="post" show_logo="1"]

show_logo="1"

can be used to show the image of the predefined “Company Logo” image upload field.
Show Logo param is an option to place the “Company Logo” image as either the single image or the first image in the slider. This will only work with the Company Logo predefined field.

show_title="1"

will show the image Title. The image title and caption can be set on the image itself by clicking on the edit icon when hovering over the image as shown below:

gd_post_badge

Displays a badge on the listing. Can be used on the Archive item or the Detail page. See an example here for use with featured listings.

Try these custom CSS classes:


gd-badge-shadow // adds a shadow
gd-ab-left // positions absolute left, usefull to display over an image but will over lap if multip used with same class
gd-ab-left-angle // same as above but at an angle like GDv1 featured badge
gd-ab-right // same but right
gd-ab-right-angle // same but right

GD Post Content – gd_post_content

GD Post Content is a new element that gives you control over how textareas are displayed in the Archive item template. You can set the max number of words to be displayed, and adjust the properties of the read more link.
Examples:
10 words without “Read More” link:

[gd_post_content key="post_content" limit="10" read_more="0"]

10 word with “CHECK IT OUT” text instead of “Read More”:

[gd_post_content key="post_content" limit="10" read_more="CHECK IT OUT" alignment="right"]

gd_post_fav

This shows a GD post favorite link.

gd_post_meta

DIsplay the value of a custom field, with options for Icon, Label, and Value. In this example gd_post_meta is used to show the video on the GD Detail template before the listing slider.


[gd_single_closed_text]
[gd_post_meta key="video" alignment="center"]
[gd_post_images type="gallery" ajax_load="1" slideshow="1" show_title="1" animation="slide" controlnav="1" link_to="lightbox" show_logo="1"]
[gd_single_taxonomies]
[gd_single_tabs]
[gd_single_next_prev]

gd_post_rating

This shows a GD post rating stars.
gd_post_title

gd_post_title

This shows a GD post title with link.

gd_recent_reviews

Display a list of recent reviews from GeoDirectory listings.

gd_search

Displays the GD search bar.

gd_single_next_prev

Shows the current post`s next and previous post links on the details page.

gd_single_tabs

Shows the current posts tabs information.

[gd_single_tabs show_as_list="1"]

will show the tabs as a list on the details page template.

gd_single_taxonomies

Shows the current post`s categories and tags.

gd_recently_viewed

gd_recently_viewed uses browser local storage to keep a list of the pages that your site visitor has opened. It works for logged in and logged out users. Only the pages visited by each individual visitor are stored, providing the visitor with a recent history of their own browsing of the site. The widget does not store any information on the site itself.

Recently Viewed requires that both the pages that are visited, and the page where Recently Viewed are on the same domain. If one is http and the other https this is considered 2 domains and so the widget will not show any listings.

Frequently Asked Questions

Was this helpful to you? Yes 4 No 11