Documentation

Displaying Gravity Search on a Page

Last modified: June 23, 2026

Introduction

Gravity Search can be displayed on any WordPress page using shortcodes.
You can output the complete search experience with one shortcode, or place the Search Form, results, and map separately to create custom page layouts.

This makes it possible to build standard search pages, split layouts, map-first interfaces, sidebar filters, and custom directory pages without writing custom PHP.

Gravity Search Full Search Form

Complete Search Experience

The easiest way to display a complete Search Form is to use the full Gravity Search shortcode.

[gfgeo_search id="123"]

Replace 123 with the ID of your Search Form.

This shortcode renders the Search Form and automatically appends the configured results and map output based on the Search Form settings. This is the recommended option for most users and requires the least amount of setup.

Separate Component Shortcodes

For custom layouts, Gravity Search also provides separate component shortcodes.

  • [gfgeo_search_form id="123"] displays only the Search Form.
  • [gfgeo_search_results id="123"] displays only the Search Results area.
  • [gfgeo_search_map id="123"] displays only the Search Map.

All component shortcodes must use the same Search Form ID so they stay connected to the same search runtime. This allows the Search Form, results, and map to share the same search runtime while being displayed in different areas of the page.

Gravity Search Flexible

Using Multiple Shortcodes

Gravity Search allows the Search Form, Search Results, and Search Map to be displayed separately using individual shortcodes.

When using multiple component shortcodes on the same page, all components must reference the same Search Form ID.

[gfgeo_search_form id="123"]

[gfgeo_search_results id="123"]

[gfgeo_search_map id="123"]

Using the same Search Form ID ensures that all components share the same search runtime, filters, results, map markers, and search state.

This makes it possible to create custom layouts where the Search Form, results, and map are displayed in different sections of the page while continuing to function as a single search experience.

If different Search Form IDs are used, each shortcode will operate independently and will not communicate with the others.

Shortcode Attributes

1. Full Search Shortcode

[gfgeo_search id="123" title="false" description="false"]

The full shortcode supports common Gravity Forms display options.

  • id: The Search Form ID.
  • title: Show or hide the form title.
  • description: Show or hide the form description.

2. Search Form Only

[gfgeo_search_form id="123"]

Use this shortcode when you want to place the Search Form separately from the results or map.


3. Results Only

[gfgeo_search_results id="123"]

Use this shortcode to place the results area in a custom location on the page.


4. Map Only

[gfgeo_search_map id="123"]

Use this shortcode to place the map separately from the form and results.

Split Layout Example

The following example places the Search Form at the top, then displays results and map in separate columns. All three shortcodes must reference the same Search Form ID.

[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>

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

Gravity Search Flexible

Best Practices

  • Use [gfgeo_search] when you want the simplest complete output.
  • Use separate component shortcodes when building custom page layouts.
  • Always use the same Search Form ID for all components on the same search page.
  • Avoid placing multiple full search shortcodes for the same Search Form on one page unless duplicate output is intentional.
  • When using the map-only shortcode, make sure Map Settings are configured and location sources are available.
menu-circle