Shortcode in Menus

Descripción

Allows you to add shortcodes in WordPress Navigation Menus so that you can generate links dynamically. Also allows you to add full fledged HTML sections to navigation menus.

Usage

See the screenshots.

Also, see a great tutorial by Aurovrata Venet

Special Thanks To

Capturas

  • Check the screen options, if you don't see the Shortcode box.
  • Check the Shortcode option to see the new Shortcode box.
  • Add your shortcode/HTML to the text area (not a link, in the screenshot). Optionally, add a title.
  • The menu item is saved.
  • The html is displayed.
  • Old Method: In the Links box, add your shortcode in the URL field.
  • Old Method: If you want to use a shortcode that outputs not just the URL, but complete HTML sections, write FULL HTML OUTPUT in the Link Text option for that link and it will output the complete HTML without breaking your site.
  • Old Method: The menu item is saved.

Instalación

  1. Add the plugin’s folder in the WordPress’ plugin directory.
  2. Activate the plugin.
  3. You can now add ShortCodes in the custom links of the menus.
  4. To test this, you can add a custom link with a ShortCode [gs_test_shortcode] as link, if it points to https://wordpress.org, plugin is working
  5. If you want to use a ShortCode that outputs not just the url, but complete HTML sections, please make use of the title ‘FULL HTML OUTPUT’ for that link and it will output the complete HTML without breaking your site.

Reseñas

12 de julio de 2019
I used this plug-in to insert some HTML code into a menu. It was simple to do and worked without problems. Kudos to the developers!
29 de abril de 2019
Man, this plugin is an amazing throwback to WordPress back in the day - you install a plugin and it works perfectly, just as advertised, straight out of the box. No nags about upgrading to a pro version for more functionality, or subscribing to some ridiculous email that you don't care about anyway or clogging up your admin with insane amounts of invasive notifications that you can't ever permanently dismiss asking for reviews. If you weren't around back then, I'm sorry for you. WordPress wasn't always like this, trust me. This plugin is awesome.
12 de febrero de 2019
This really is functionality that WordPress should offer out of the box, but given that it doesn't, this plugin is exceptionally well made and works wonderfully - thank you!
9 de febrero de 2019
only thing I would change is adding the following instruction... "Scroll through the screenshots" I'm not sure if this is why others have complained about documentation, but this is my first time encountering a screenshot that was actually a compilation of multiple screenshots. It wasn't until I read another review saying the instructions were in the screenshot, that I went back, and wallah!
23 de octubre de 2018
I was looking for a way to add shortcut inside the menu. This plugin handled the job perfectly. Thanks to the Author. PS: For those complaining about Documentation. If you can't follow directly from the screenshot I'd suggest hiring a WordPress Professional to complete your website.
Leer todas las 53 reseñas

Colaboradores y desarrolladores

«Shortcode in Menus» es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

Traduce «Shortcode in Menus» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

3.5

  • Resolved some WPCS compatibility issues.
  • Added resource version for static resources for busting cache in new releases.
  • Added text domain to localisable text strings.
  • Loading the custom JS in footer instead of header for performance benefit.
  • Handle PHP notice in custom cases when start_el is not passed with $item object.

3.4

  • Escaping of output within a lot of functions.
  • Made the code WordPress PHPCS Compatible.
  • Patch to make it work with Max Mega Menu plugin.

3.3

  • Fixed a compatibility issue with Twenty Fifteen theme.
  • Minified JS.
  • Conditional loading of admin class for performance improvement.
  • Some more code refactoring.
  • Testing with WordPress 4.8.1
  • Changed minimum required WordPress version from 3.5 to 3.6

3.2

  • Code Refactoring.
  • Changed tested upto.
  • Corrected links in description.

3.1

  • Fixed the bug with clean_url filters as reported by Lee Willis
  • Made the code translation ready.

3.0

  • Removed the error trigger on the FULL HTML OUTPUT usage.
  • Added the feature to use shortcodes in titles of menu items as well(works with all types of menu items).
  • Resolved the PHP Notice, popping up in the error log while adding new shortcodes.

2.1

  • Bug fix for custom links with ShortCode like structure not being displayed in the nav menus.

2.0

  • Added new Shortcode box to Menu Editor.
  • Added html support.
  • Deprecated Links box basis.
  • Added screenshots.
  • Updated readme and instructions.

1.2

  • Added ability to echo complete HTML output instead of just URL by using ShortCode.

1.1

  • Tested with WordPress 4.0

1.0

  • Added prefix to function which was conflicting with another plugin.

0.1

  • Initial Plugin uploaded.