이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Shortcode in Menus

설명

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

스크린샷

  • 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.

설치

  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.

FAQ

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:

후기

2023년 9월 15일 1 reply
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.
모든 81 평가 읽기

기여자 & 개발자

“Shortcode in Menus”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “Shortcode in Menus”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

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