Documentation

Displaying Gravity Search on a Page

Last modified: August 3, 2026

Introduction

Gravity Search can be displayed on WordPress pages using shortcodes.

You can render the complete Search with one shortcode or place its optional search form, results, and map in separate areas to create a custom layout.

This allows you to build standard search pages, directories, split layouts, map-first interfaces, and sidebar-filter layouts without writing custom PHP.

Complete Gravity Search with filter form, results, and map

Finding the Search ID

Every Search has an ID assigned by Gravity Forms.

Locate the Search in the Gravity Forms list and copy the number shown in the ID column.

Use this Search ID in each Gravity Search shortcode. Do not use the Target Form ID.

In the examples below, replace 123 with your Search ID.

Complete Search Shortcode

The simplest way to display a complete Search is:

[gfgeo_search id="123"]

This shortcode renders the Search using its configured frontend search form, results, and map settings.

If the frontend search form is disabled, the shortcode can still render initial-load or predefined results and the configured map without visitor-facing fields.

Use the complete shortcode when all Search components should appear together in the standard layout.

Component Shortcodes

Use component shortcodes when the search form, results, and map need to appear in different areas of the page.

Search Form Only

[gfgeo_search_form id="123"]

This shortcode renders only the optional frontend search form.

It produces no output when Disable Search Form is enabled.

Results Only

[gfgeo_search_results id="123"]

This shortcode renders the results area without automatically rendering the search form or map.

Map Only

[gfgeo_search_map id="123"]

This shortcode renders the Search map separately from the standard results layout.

Select Display via Shortcode under Map Settings when the map should be rendered through this shortcode rather than inside the standard results output.

Connecting Multiple Components

All component shortcodes belonging to the same Search must use the same Search ID:

[gfgeo_search_form id="123"]

[gfgeo_search_results id="123"]

[gfgeo_search_map id="123"]

Using the same Search ID allows the components to share the same filters, query state, results, map markers, and runtime.

If different Search IDs are used, each shortcode belongs to a different Search and operates independently.

Gravity Search with separately positioned form, results, and map

Shortcode Attributes

1. Complete Search

[gfgeo_search id="123" title="false" description="false"]
  • id: The Search ID.
  • title: Use true or false to show or hide the Search title.
  • description: Use true or false to show or hide the Search description.

2. Search Form Only

[gfgeo_search_form id="123" title="false" description="false"]
  • id: The Search ID.
  • title: Show or hide the Search title.
  • description: Show or hide the Search description.

3. Results Only

[gfgeo_search_results id="123"]

The results-only shortcode accepts the Search ID.


4. Map Only

[gfgeo_search_map id="123"]

The map-only shortcode accepts the Search ID.

Split Layout Example

The following example places the optional search form above separate results and map columns:

[gfgeo_search_form id="123"]

<div class="search-layout">
	<div class="search-results-column">
		[gfgeo_search_results id="123"]
	</div>

	<div class="search-map-column">
		[gfgeo_search_map id="123"]
	</div>
</div>

The HTML provides the page structure. Add CSS through your theme, page builder, or the Search’s custom CSS settings to create the desired column layout.

This approach is useful for directories, store locators, property searches, and other experiences where results and the map should remain visually separate.

Searches Without a Search Form

A Search does not require visitor-facing fields.

For a directory, predefined listing, or map without a frontend search form:

  1. Configure Search Defaults and Predefined Filters.
  2. Enable the required Initial Load behavior.
  3. Enable Disable Search Form.
  4. Use [gfgeo_search] for the complete output or place the results and map component shortcodes separately.

Do not use [gfgeo_search_form] when the frontend search form is disabled.

Best Practices

  • Use [gfgeo_search] for the simplest complete Search output.
  • Use component shortcodes only when you need a custom page layout.
  • Use the Search ID—not the Target Form ID—in every shortcode.
  • Use the same Search ID for all components that should share one runtime.
  • Avoid rendering the same complete Search more than once on a page unless duplicate output is intentional.
  • When using [gfgeo_search_map], configure Map Display Mode and select at least one Location Source Field.
  • Test initial-load behavior when displaying results without a frontend search form.
menu-circle