Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jason-alley opened this issue Jan 3, 2023 · 4 comments
Open

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

jason-alley opened this issue Jan 3, 2023 · 4 comments

Comments

@jason-alley
Copy link

const navigation = findMenuByLocation(menus, navigationLocation);

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
Copy link
Owner

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
Copy link

@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
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants