JEverhart383 / astro-wordpress-starter

150 stars 31 forks source link

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

Open gjohnhazel opened 6 months ago

gjohnhazel commented 6 months ago

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

andrefemlo commented 5 months ago

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.