Advanced

Dynamic WordPress Menu Items

In this example, we will demonstrate how to use the [ifso] shortcode alongside existing top-level menu items.

Step 1 – Create an If-So trigger

  1. Navigate to If-So > Add new
  2. Select a condition
  3. Pate the following code in the version’s content field.
<a href="http://exampe.com">Item-name</a>

Don’t forget to replace the link “http://example.com” with your page link.

  1. Publish, and then copy the trigger’s shortcode

Step 2 – Add a new item to the menu

  1. Install the Shortcode in Menus plugin
  2. Create a new “Shortcode menu item”. Leave the title field blank and paste the If-So shortcode (from step 1) in the main content field

Ready to get started?
Try it on your website