Support » Plugin: Shortcode in Menus » Sample HTML

  • Resolved gerhardjvr


    I’m trying to add the Username of the currently logged in User to the menu, but failing (newbie)… I get this on the menu;

    Welcome: [current-username]

    Here is the code;

    <p><em><strong>Welcome: </em>[current-username]</strong></p>

    • This topic was modified 1 year, 9 months ago by  gerhardjvr.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Gagan Deep Singh



    Sorry for the delayed reply, I’m extremely busy these days working out certain new things in WordPress.

    About the issue you’re facing, I hope you have some sort of plugin or theme functionality, that is defining the shortcode you’re trying to use.

    By default shortcode in menus plugin does not offer any shortcodes that you can use, but just provides the means to use them if they are already defined.

    Just in case that isn’t defined, here’s a code snippet that you can paste in your theme’s functions.php or any other custom plugin that you might have on your site:

    Once you have the code in your theme/plugin, you can add that to the menu like this:

    To edit an existing shortcode you can do something like this:

    Thank you so much, Gagan, your support has been exemplary.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sample HTML’ is closed to new replies.