Dynamic WordPress menus – 5 min setup

Set up dynamic WordPress menu items that automatically adjust based on a predefined set of conditions.

Use cases

  • Set up a dynamic WordPress menu item that points to the nearest branch.
  • Display a Start here menu item for visitors who haven’t yet visited the Start here page.
  • Disaply a “Special Deal” dynamic menu item for users visiting from a specific country.

Step-by-step: How to set up dynamic WordPress menu item

The setup involves two main steps: (1) creating a trigger that defines the conditions and their corresponding menu items, and (2) adding that trigger to your dynamic menu WordPress setup.

  1. Download and activate the If-So Dynamic Content plugin.
  2. On your WordPress dashboard, go to If-SoAdd New Trigger.
  3. In version A, select the desired condition (for example, geolocation, date, or UTM parameter) and choose when the dynamic menu WordPress item will appear.
  4. In the Version A content field, switch the WYSIWYG editor to Code mode, then paste the HTML line below. Replace the URL https://example.com with the page link you want the menu item to lead to, and replace Item Name with your desired menu item label.
<a href="https://example.com">Item Name</a>
  1. On your WordPress dashboard, go to AppearanceMenus.
  2. Click Custom Links to add a new custom menu item. Enter # under the URL field, and paste the trigger’s shortcode in the Link Text field.

FAQ

Does the dynamic menu item display work with page caching?

Yes. If-So’s dynamic WP menu items work seamlessly with all caching systems by using AJAX loading. The correct menu version is loaded after the cached page is served, ensuring each visitor sees the right menu items based on the set conditions without affecting performance.

Screenshots

Selecting a condition for the dynamic wordpress menu  item
Setting up dynamic menu in WordPress
dynamic WordPress menu

Related content

Was this Helpful ?

    We're sorry couldn’t be more helpful ☹️

      November Sale
      Up to 40%