wp-decoupled icon indicating copy to clipboard operation
wp-decoupled copied to clipboard

Use Menu Queries to dynamically fetch WordPress Menus

Open imranhsayed opened this issue 4 years ago • 7 comments

  • [ ] Use Menu Queries to dynamically fetch WordPress Menus

imranhsayed avatar Jan 13 '21 17:01 imranhsayed

@imranhsayed here do you mean the header and footer menus right ? for that do we need hcms plugin ?

NicestRudeGuy avatar Jan 14 '21 11:01 NicestRudeGuy

I suggest we create our own plugin and add that as a dependency. That plugin has too many things that not required for this project.

imranhsayed avatar Jan 14 '21 13:01 imranhsayed

@imranhsayed now we can fetch the menus without any plugin , just did some experiment and we are getting the menus

NicestRudeGuy avatar Jan 15 '21 11:01 NicestRudeGuy

You can get the menus but the menu needs to be registered in WordPress. The user might register any menu and then expect the frontend to work. To rule out this issue we can create our own plugin and put in README to ask the user to created and add our menus only.

imranhsayed avatar Jan 15 '21 12:01 imranhsayed

but we can have him name the menus like HEADER_MENU and FOOTER_MENU . this way we wont have another plugin to manage right ?

NicestRudeGuy avatar Jan 15 '21 13:01 NicestRudeGuy

We can register the menus into our theme https://github.com/rtCamp/wp-decoupled/issues/58

imranhsayed avatar Jan 19 '21 16:01 imranhsayed

@NicestRudeGuy Now that we are using the storefront theme Please use the menu location name that storefront theme uses.

imranhsayed avatar Jan 25 '21 11:01 imranhsayed