Custom items for Menus

When editing Menus, I find 5 typs of items that can be added:Custom LinksPagesPostsCategoriesTagsWould it be possibl

When editing Menus, I find 5 typs of items that can be added:

  • Custom Links
  • Pages
  • Posts
  • Categories
  • Tags

Would it be possible to add custom ones? Let's say for instance that I want to add an image, or a search bar, or whatever.

Could I somehow add new menu items types, that render the code that I choose for them?

When editing Menus, I find 5 typs of items that can be added:

  • Custom Links
  • Pages
  • Posts
  • Categories
  • Tags

Would it be possible to add custom ones? Let's say for instance that I want to add an image, or a search bar, or whatever.

Could I somehow add new menu items types, that render the code that I choose for them?

Share Improve this question asked Feb 7, 2020 at 10:48 Enrique Moreno TentEnrique Moreno Tent 2771 gold badge3 silver badges11 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

Not in the menu management interface.

You can inject custom elements if you create a custom nav walker. This requires some coding skill as well as trial and error to figure out which parts of the code you need to use, and how to tweak them.

Or, if you're comfortable using JavaScript to change things after the menu is built (so some visitors and search engines might not see the change), you could use a document.ready script that identifies a "regular" menu item and then injects whatever image etc. you want to display in its place.

You will need a plugin for that. For example, something like this one: https://wordpress/plugins/wp-megamenu/

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744767268a4592537.html

相关推荐

  • Custom items for Menus

    When editing Menus, I find 5 typs of items that can be added:Custom LinksPagesPostsCategoriesTagsWould it be possibl

    17小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信