Get menu item by name or slug

I would like to retrieve a menu item object by name. I am not sure what method to use.A similar method that works for me

I would like to retrieve a menu item object by name. I am not sure what method to use.

A similar method that works for menu names is wp_get_nav_menu_object(). If you read the documentation, you can pass the menu name and the menu object would be retrieved.

I would like to do the same thing, but for menu items instead of menus. I like to pass a menu item name or slug, and in return, I get the menu item object. Is there such method?

Thanks.

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

相关推荐

  • Get menu item by name or slug

    I would like to retrieve a menu item object by name. I am not sure what method to use.A similar method that works for me

    1天前
    70

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

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

关注微信