Title: Create Dynamic Menus
Last modified: August 21, 2016

---

# Create Dynamic Menus

 *  [andrezasv](https://wordpress.org/support/users/andrezasv/)
 * (@andrezasv)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/create-dynamic-menus/)
 * Hi,
 * I read in the pro version that we can use these shortcodes:
    [wp-wpurl] – WordPress
   address (e.g. “http://example.com/”). [wp-siteurl] – Blog address (e.g. “http://
   example.com/blog”). [wp-admin] – Admin area URL (e.g. “http://example.com/wp-
   admin/”). [wp-name] – Blog title. [wp-version] – Current WordPress version.
 * But I dont undestand how to use shortcodes to create admin bar menus. For instance,
   how to create a menu to the Pages? Considering that I have a multisite and each
   site has a diffente set of pages, consequently each site has different links 
   to Pages. For this reason I named it dynamic menus.
 * I want to do this: create a admin bar with the menus Visit Site, Visit Backend
   and Logout. Which the shortcodes I have to use for this?
 * For instance, if I want create a menu to link to Profile, can I use this for 
   the URL: [wp-wpurl]/profile.php ?
 * Other question: How to add icons to each new menu located in the left (not the
   bar admin menu)?
 * [https://wordpress.org/plugins/admin-menu-editor/](https://wordpress.org/plugins/admin-menu-editor/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Janis Elsts](https://wordpress.org/support/users/whiteshadow/)
 * (@whiteshadow)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/create-dynamic-menus/#post-4792626)
 * > But I dont undestand how to use shortcodes to create admin bar menus.
 * Unfortunately, the current version of the Toolbar Editor add-on does not support
   shortcodes. They only work in the main plugin, Admin Menu Editor Pro.
 * > Other question: How to add icons to each new menu located in the left (not 
   > the bar admin menu)?
 * To change admin menu icons, click the “Show advanced options” link under menu
   settings, then use the “Icon URL” field to set the icon.
 *  Thread Starter [andrezasv](https://wordpress.org/support/users/andrezasv/)
 * (@andrezasv)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/create-dynamic-menus/#post-4792652)
 * 1) What should I type in the URL field to create an admim bar menu that links
   to “visit the site” (e.g. [http://www.mysite.com.br](http://www.mysite.com.br))?
   As do the shortcode [wp-wpurl]. Or for instance to link to the subsites of the
   network: [http://www.mysite.com.br/site01](http://www.mysite.com.br/site01)
 * 2) What should I type in the URL field to create an admim bar menu that links
   to “Logout”?
 * 3) I noted that I have to type the end of the URL, and the whole URL is generated(
   with the domain + /wp-admin), such as I type “edit.php” and it generates the 
   link “[http://amedemo.com/wp-admin/edit.php&#8221](http://amedemo.com/wp-admin/edit.php&#8221);.
   If I’m in a subsite of the network, the link will be generated according to the
   subsite? For instance, in a subsite will be genrated a link like [http://mysite.com.br/subsite01/wp-admin/edit.php](http://mysite.com.br/subsite01/wp-admin/edit.php)?
   or [http://mysite.com.br/subsite02/wp-admin/edit.php](http://mysite.com.br/subsite02/wp-admin/edit.php)
   or [http://mysite.com.br/subsite03/wp-admin/edit.php](http://mysite.com.br/subsite03/wp-admin/edit.php)
   and so on…
 * Thank you very much.
 *  Plugin Author [Janis Elsts](https://wordpress.org/support/users/whiteshadow/)
 * (@whiteshadow)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/create-dynamic-menus/#post-4792656)
 * Could you please clarify which of these two you are talking about:
    1. The WordPress Toolbar – a horizontal menu at the top of the page. Was known 
       as “admin bar” in older WP versions.
    2. The actual admin menu – vertical menu at the left side of the page. Unlike the
       Toolbar, the admin menu is only visible in the admin backend/Dashboard.
 * > 1) What should I type in the URL field to create an admim bar menu that links
   > to “visit the site” (e.g. [http://www.mysite.com.br](http://www.mysite.com.br))?
   > As do the shortcode [wp-wpurl]. Or for instance to link to the subsites of 
   > the network: [http://www.mysite.com.br/site01](http://www.mysite.com.br/site01)
 * As I said, it’s not possible to use shortcodes in the toolbar/admin bar. However,
   if you were actually referring to the admin menu, [wp-siteurl] would be a good
   choice. In a network, it would link to the current subsite.
 * > 2) What should I type in the URL field to create an admim bar menu that links
   > to “Logout”?
 * That’s not possible with this plugin. Also, the toolbar (admin bar) already includes
   a logout link by default. Why not just use that? You could move it to a different
   location if necessary.
 * > 3) I noted that I have to type the end of the URL, and the whole URL is generated(
   > with the domain + /wp-admin), such as I type “edit.php” and it generates the
   > link “[http://amedemo.com/wp-admin/edit.php&#8221](http://amedemo.com/wp-admin/edit.php&#8221);.
   > If I’m in a subsite of the network, the link will be generated according to
   > the subsite?
 * It would be generated according to the subsite.
 *  Thread Starter [andrezasv](https://wordpress.org/support/users/andrezasv/)
 * (@andrezasv)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/create-dynamic-menus/#post-4792657)
 * Thanks for the answer.
 * I’m referring to: The WordPress Toolbar – a horizontal menu at the top of the
   page. Was known as “admin bar” in older WP versions. So I think your answers 
   were related to the vertical menu.
 * 1) What should I type in the URL field to create an admim bar menu that links
   to “visit the site” (e.g. [http://www.mysite.com.br](http://www.mysite.com.br))?
   As do the shortcode [wp-wpurl]. Or for instance to link to the subsites of the
   network: [http://www.mysite.com.br/site01](http://www.mysite.com.br/site01)
 * 2) What should I type in the URL field to create an admim bar menu that links
   to “Logout”?
 * How to include a logout link by default? I could not find this option.
 *  Plugin Author [Janis Elsts](https://wordpress.org/support/users/whiteshadow/)
 * (@whiteshadow)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/create-dynamic-menus/#post-4792675)
 * > 1) What should I type in the URL field to create an admim bar menu that links
   > to “visit the site” (e.g. [http://www.mysite.com.br](http://www.mysite.com.br))?
   > As do the shortcode [wp-wpurl]. Or for instance to link to the subsites of 
   > the network: [http://www.mysite.com.br/site01](http://www.mysite.com.br/site01)
 * To put it simply: You can’t do that. As I mentioned in my two previous posts,
   Toolbar Editor does not support shortcodes. There is no other way to link to 
   the current site (as far as I’m aware of).
 * > 2) What should I type in the URL field to create an admim bar menu that links
   > to “Logout”?
   > How to include a logout link by default? I could not find this option.
 * In the toolbar editor, you can find the logout menu under “top-secondary” -> “
   Howdy, Demo User” -> “user-actions” -> “Log out”.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Create Dynamic Menus’ is closed to new replies.

 * ![](https://ps.w.org/admin-menu-editor/assets/icon-128x128.png?rev=1418604)
 * [Admin Menu Editor](https://wordpress.org/plugins/admin-menu-editor/)
 * [Support Threads](https://wordpress.org/support/plugin/admin-menu-editor/)
 * [Active Topics](https://wordpress.org/support/plugin/admin-menu-editor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/admin-menu-editor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/admin-menu-editor/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Janis Elsts](https://wordpress.org/support/users/whiteshadow/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/create-dynamic-menus/#post-4792675)
 * Status: not resolved