Custom URL Override

Knowledgebase Docs » Bellows

Override the menu item’s default URL with your custom URL, which can be dynamic through the use of shortcodes

Each item in the menu has a URL that it links to. For Post or Page items, that URL is set behind the scenes based on the associated content. For custom menu items, that URL is set in the core menu item settings.

The Custom URL Override will override the default URL for this item with your custom URL value. The main purpose to this is that you can use shortcodes within this field, which gives you the flexibility to add dynamic URLs. The shortcodes you write are up to you, but one example of a necessarily dynamic URL is a logout link, which requires a nonce. Alternatively, you could create logic that sets up a different URL based on the user’s state – such as a link to a specific profile based on their user ID, or a different page depending on their logged in/logged out status.

Remember that any shortcodes you write need to return their values, not print/echo.