Black Friday & Cyber Monday
50% OFF All plans, upgrades & renewals
View offers

SHORTCODES

Directory form shortcode reference

Use GEO my WP shortcodes for complete forms, search controls, results and maps, with saved form IDs and dynamic results-page examples.

2 min read · Updated December 1, 2026

The gmw shortcode displays a saved GEO my WP form or one of its elements. Use the numeric ID shown in GEO my WP → Forms. The examples use 123 as a placeholder.

Supported element selectors

Shortcode Output
[gmw form="123"] Complete form, subject to its enabled search/list/map settings.
[gmw search_form="123"] Search controls only.
[gmw search_results="123"] Results for the specified saved form.
[gmw map="123"] The form's map in a separate position; enable shortcode map placement in that form.
[gmw form="results"] Results for the submitted form ID carried in the request.

Use one element selector per shortcode. Put it first if an integration adds other supported parameters: the core handler identifies the element from the first attribute. Arbitrary attributes do not replace saved form settings or create new search controls.

The dynamic results shortcode

[gmw form="results"] uses the submitted form identifier in the URL. Opening its destination directly without a submitted form can correctly produce no output. Use it on the results page selected by the originating form or Search Form widget.

Use a fixed numeric form ID for a normal same-page directory. A literal form name or a page ID is not a replacement for that form ID.

Maps and special form types

A standalone Mashup Map or Global Map uses the usage example provided by its form editor, typically the map selector. These types have their own requirements and settings. A map shortcode does not convert a standard form into a Global Map or install its extension.

Where to put a shortcode

Place it in processed page content, a WordPress Shortcode block or an appropriate page-builder element. Use straight quotes. Do not paste it into a Code block, which is intended to show code as text. A PHP template can call WordPress's do_shortcode(); PHP does not execute when pasted into ordinary page content.

If output is missing

  1. Confirm the shortcode is being processed, rather than printed literally.
  2. Confirm the saved form exists and its ID matches.
  3. Enable the component and extension that own the form.
  4. Check whether the requested element is enabled for initial or submitted results.
  5. For the dynamic results shortcode, submit the originating search rather than opening the results page directly.

There is no need to publish a new form record as a WordPress post. Saving the GEO my WP configuration and embedding its ID are separate from publishing the page that contains it.