Title: Shortcode in Menus
Author: Gagan Deep Singh
Published: <strong>13 septembris, 2013</strong>
Last modified: 10 februāris, 2026

---

Meklēt spraudņus

![](https://ps.w.org/shortcode-in-menus/assets/banner-772x250.png?rev=1016802)

![](https://ps.w.org/shortcode-in-menus/assets/icon-128x128.png?rev=1016813)

# Shortcode in Menus

 Autors [Gagan Deep Singh](https://profiles.wordpress.org/gagan0123/)

[Lejupielādēt](https://downloads.wordpress.org/plugin/shortcode-in-menus.3.5.1.zip)

 * [Sīkāka informācija](https://lv.wordpress.org/plugins/shortcode-in-menus/#description)
 * [Atsauksmes](https://lv.wordpress.org/plugins/shortcode-in-menus/#reviews)
 *  [Uzstādīšana](https://lv.wordpress.org/plugins/shortcode-in-menus/#installation)
 * [Attīstība](https://lv.wordpress.org/plugins/shortcode-in-menus/#developers)

 [Atbalsts](https://wordpress.org/support/plugin/shortcode-in-menus/)

## Apraksts

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](https://lv.wordpress.org/plugins/shortcode-in-menus/?output_format=md#screenshots).

Also, see a [great tutorial](https://wordpress.org/support/topic/how-does-it-work-24/page/2/#post-4987738)
by Aurovrata Venet

**Special Thanks To**

 * [Aurovrata Venet](https://wordpress.org/support/profile/aurovrata) for [this great tutorial](https://wordpress.org/support/topic/how-does-it-work-24/page/2/#post-4987738).
 * [Lee Willis](https://wordpress.org/support/profile/leewillis77) for finding out
   and helping in resolving [this bug](https://wordpress.org/support/topic/causes-urls-to-be-amended-in-undesired-ways).
 * [Dennis Hunink](https://wordpress.org/support/users/dhunink/) for reporting [this bug](https://wordpress.org/support/?p=10325305).
 * [@hbwarper](https://wordpress.org/support/users/hbwarper/) for providing a patch
   to Dennis’ issue.

## Ekrānuzņēmumi

 * [[
 * 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.

## Uzstādīšana

 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.

## BUJ

### How to enter shortcode

You can add enter shortcodes in the “Custom Link” menu item, or you can use “Shortcode”
menu shortcodes in menus.

Screencast for using WordPress’ default “Custom Links” menu item:

Screencast for using “Shortcode” menu item:

### How to view/edit “Shortcode” menu item

You will need to enable displaying of “Description” in order to view/edit “Shortcode”
menu item.

Here’s a screencast for the same:

## Atsauksmes

![](https://secure.gravatar.com/avatar/2a3375dfa51746fb4ac9decdd101d93e8148b554ee06d3b0bace1efee42668b2?
s=60&d=retro&r=g)

### 󠀁[‘Please provide a valid link.’](https://wordpress.org/support/topic/please-provide-a-valid-link/)󠁿

 [andrebell82](https://profiles.wordpress.org/andrebell82/) 10 marts, 2026

Interesting concept but adding the shortcode to the link as the images show generates
a wordpress error: ‘Please provide a valid link.’ So, unfortunately, cannot add 
the shortcode to nav bar as the example images show 🙁

![](https://secure.gravatar.com/avatar/ec147139c32dab1fc287160c663450e1aed03e9e1293fc72f60b808479a56f26?
s=60&d=retro&r=g)

### 󠀁[Please don’t let this plugin die..](https://wordpress.org/support/topic/please-dont-let-this-plugin-die/)󠁿

 [Namaste](https://profiles.wordpress.org/victoryel/) 12 marts, 2024

I kindly ask the developers to maintain this plugin updated… please 🙂

![](https://secure.gravatar.com/avatar/0f284254efd1d885741b5514ba8f5f3eea4ac2ca353ad45d2dcf7c6dd7ad7eb8?
s=60&d=retro&r=g)

### 󠀁[Didn’t work for me](https://wordpress.org/support/topic/didnt-work-for-me-195/)󠁿

 [madbirdesign](https://profiles.wordpress.org/madbirdesign2/) 11 decembris, 2023

Didn’t work in shortcode menu item or custom link.

![](https://secure.gravatar.com/avatar/4d9ff8ac325fdc9f8fa842ed8aefd0a119fe0feecfe8e5fb850d39c5b0c09778?
s=60&d=retro&r=g)

### 󠀁[Didn’t work for me….](https://wordpress.org/support/topic/didnt-work-for-me-194/)󠁿

 [pebworthbells](https://profiles.wordpress.org/pebworthbells/) 15 septembris, 2023
1 atbilde

The plugin seemed fine and I used it to create custom menu items for my websites
headers and footers. v\Very happy with the results until complaints came in that
blocks of buttons had stopped working on some pages. On investigation, I found that
blocks of 4 or 5 buttons in adjacent columns were not working. The outer buttons
worked fine, but any inner button (i.e. it had another button in the columns either
side of it) would work once and then stop responding until the page was reloaded.
In addition some page sections became unselectable to edit in Elementor. Very quickly
it became apparent that this problem was universal to all blocks on all pages! I
disabled the plugin and everything came back to work fine! luckily, it was the only
change I had made in recent days, so the likely culprit was relatively obvious. 
I am guessing there is a compatibility issue with current version of Elementor.

![](https://secure.gravatar.com/avatar/871ff341cfa2d0153a8c305af34a5e9ec6f6cf800530cc5d8e493593bcbfbe85?
s=60&d=retro&r=g)

### 󠀁[Thank you!](https://wordpress.org/support/topic/thank-you-3409/)󠁿

 [schroederskater](https://profiles.wordpress.org/schroederskater/) 5 augusts, 2023

Easy to use. Does what it is supposed to. Great! Than you very much! Thomas

![](https://secure.gravatar.com/avatar/f33236201e55e772441f2ff66b53b7796e09dca8cfa5689a4a249aee3418b656?
s=60&d=retro&r=g)

### 󠀁[The perfect shortcode in menu plugin!](https://wordpress.org/support/topic/the-perfect-shortcode-in-menu-plugin/)󠁿

 [basbuis](https://profiles.wordpress.org/basbuis/) 10 februāris, 2023

Thanks, it’s working perfect and fast.

 [ Lasīt 82 atsauksmes ](https://wordpress.org/support/plugin/shortcode-in-menus/reviews/)

## Autori un izstrādātāji

“Shortcode in Menus” ir atvērtā pirmkoda programmatūra. Šo spraudni ir veidojuši
šādi cilvēki.

Līdzdalībnieki

 *   [ Gagan Deep Singh ](https://profiles.wordpress.org/gagan0123/)
 *   [ Saurabh ](https://profiles.wordpress.org/saurabhshukla/)

[Tulkot “Shortcode in Menus&#8221 savā valodā.](https://translate.wordpress.org/projects/wp-plugins/shortcode-in-menus)

### Vai jūs interesē attīstība?

[Pārlūkojiet kodu](https://plugins.trac.wordpress.org/browser/shortcode-in-menus/),
apmeklējiet[ SVN krātuvi ](https://plugins.svn.wordpress.org/shortcode-in-menus/)
vai abonējiet[ attīstības žurnālu](https://plugins.trac.wordpress.org/log/shortcode-in-menus/),
ko izveidojis [RSS](https://plugins.trac.wordpress.org/log/shortcode-in-menus/?limit=100&mode=stop_on_copy&format=rss).

## Izmaiņu žurnāls

#### 3.5.1

 * Change plugin constants to follow naming conventions as recommended by WordPress
   Guidelines.
 * Strict input filters for admin pages, for user input values.
 * Adhere to more strict PHPCS ruleset.

#### 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](https://wordpress.org/support/topic/causes-urls-to-be-amended-in-undesired-ways)
   with clean_url filters as reported by [Lee Willis](https://wordpress.org/support/profile/leewillis77)
 * 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.

## Meta

 *  Versija **3.5.1**
 *  Pēdējo reizi atjaunots: **pirms 2 mēnešiem**
 *  Aktīvās instalācijas: **50 000+**
 *  WordPress versija ** 3.6 vai jaunāka **
 *  Pārbaudīts līdz: **6.9.4**
 *  PHP versija ** 5.6 vai jaunāka **
 *  Valoda
 * [English (US)](https://wordpress.org/plugins/shortcode-in-menus/)
 * Birkas:
 * [custom link](https://lv.wordpress.org/plugins/tags/custom-link/)[menus](https://lv.wordpress.org/plugins/tags/menus/)
   [shortcode](https://lv.wordpress.org/plugins/tags/shortcode/)
 *  [Papildu skats](https://lv.wordpress.org/plugins/shortcode-in-menus/advanced/)

## Vērtējumi

 4.7 no 5 zvaigznēm.

 *  [  74 5-star reviews     ](https://wordpress.org/support/plugin/shortcode-in-menus/reviews/?filter=5)
 *  [  2 4-star reviews     ](https://wordpress.org/support/plugin/shortcode-in-menus/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/shortcode-in-menus/reviews/?filter=3)
 *  [  1 2-star review     ](https://wordpress.org/support/plugin/shortcode-in-menus/reviews/?filter=2)
 *  [  5 1-star reviews     ](https://wordpress.org/support/plugin/shortcode-in-menus/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/shortcode-in-menus/reviews/#new-post)

[Skatīt visas atsauksmes](https://wordpress.org/support/plugin/shortcode-in-menus/reviews/)

## Līdzdalībnieki

 *   [ Gagan Deep Singh ](https://profiles.wordpress.org/gagan0123/)
 *   [ Saurabh ](https://profiles.wordpress.org/saurabhshukla/)

## Atbalsts

Jums ir kaut kas ko teikt? Vajadzīga palīdzība?

 [Skatīt atbalsta forumu](https://wordpress.org/support/plugin/shortcode-in-menus/)

## Ziedojiet

Vai vēlaties atbalstīt šī spraudņa pilnveidošanu?

 [ Ziedojiet šim spraudnim ](https://PayPal.me/gagan0123)