JEverhart383 / astro-wordpress-starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In WP 6.5.3, Menus have been deprecated in favor of Navigation

gjohnhazel opened this issue · comments

With a brand new WordPress website, this (from lib/api.js) now fails:
{ menus(where: {location: PRIMARY}) { nodes { name menuItems { nodes { uri url order label } } } } generalSettings { title url description } }

The workaround is to remove the (where {location: PRIMARY}) from the above AND

From src/SiteNave.astro comment out
{menu.menuItems.nodes.map(menuItem => { return (<li> <a href={menuItem.uri || '/'}>{menuItem.label}</a> </li>) })}

Obviously, this means you temporarily will have no menu until a better solution is provided

Still working w some wordpress themes.
So other alternative is create a child theme and create a location of the menu in the wordpress theme file.

Or u can create yourself a lightwheigt theme.