colbyfayock / next-wordpress-starter

📝 Bring WordPress to the static world with Next.js
https://next-wordpress-starter.spacejelly.dev
MIT License
1.17k stars 289 forks source link

Navigation returns undefined when using 2022 themes and above. #445

Open jason-alley opened 1 year ago

jason-alley commented 1 year ago

https://github.com/colbyfayock/next-wordpress-starter/blob/65b3350bd194bff5673de859af80a97c537d3b14/src/components/Nav/Nav.js#L27

This variable, if i set my theme to say 2021 or anything lower, but the new default themes 2022/2023 don't use the old menu settings system, menus are GB blocks now.

I'm still a bit new to this headless stuff so maybe i am missing something.

colbyfayock commented 1 year ago

hey @jason-alley I'm able to reproduce it myself. i'll see if i can figure out how to query that data though i haven't really been working in wordpress for a bit now

if you're able to figure it out, feel free to submit a pull request! otherwise might try to get to it as i can

JEverhart383 commented 1 year ago

@jason-alley there are some folks of working to add support for side editor elements to WPGraphQL, but it's still pretty early. They are just taking the beta label off the side editor in WP 6.2. I would recommend using a classic theme if you want to go headless. Here's a link to the project working on support if you're interested: https://github.com/AxeWP/wp-graphql-site-editor

dimitarvalkov commented 6 months ago

I have the same problem. Added my custom root/sage theme (v.9x) and created custom navigations in setup.php Problem solved. But a new one came out..... wp graphql doesn't work with multilingual navigations ;( image

JEverhart383 commented 6 months ago

@dimitarvalkov Are you using a particular plugin for the multilingual functionality? I've made multilingual menus before with a WPGraphQL extension for Polylang