What Is a Shortcode? #
A shortcode is a simple text code enclosed in square brackets [ ] that lets you add dynamic features or content anywhere on your WordPress website — without writing any PHP or HTML code.
Directorist uses shortcodes to display directory-related content such as listings, search forms, author pages, and more. Each shortcode loads a specific layout or function within a post, page, or widget area.
For example:
[directorist_all_listing]
This shortcode displays all published listings on your site.
How to Use Shortcodes #
- Open the Page or Post Editor
- From your WordPress dashboard, go to Pages → Add New (or edit an existing page).
- Add a Shortcode Block
- Click the + icon to add a new block.
- Search for “Shortcode” and select it from the block options.

- Insert the Shortcode
- Paste the desired shortcode into the block. Example:
[directorist_add_listing]
- Paste the desired shortcode into the block. Example:
- Preview and Publish
- Click Preview to confirm that the shortcode output looks correct.
- Once satisfied, click Publish to make it live.

You can also add shortcodes in widgets, templates, or theme files using the do_shortcode() function in PHP if you prefer manual integration.