Query menuItems by array of locations #2731
Unanswered
dimitryvolos
asked this question in
Q&A
Replies: 2 comments
-
@dimitryvolos you should be able to use |
Beta Was this translation helpful? Give feedback.
0 replies
-
@justlevine thank you for your reply. I have tested
If I do not add Any other recommendations? Regards, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Guys,
I have multiple menus set up (WordPress), each with a custom location assigned.
I can query 'menuItems' by a single location, for example:
menuItems(where: { location: MENU_10 }) {
nodes {
key: id
url
title
}
}
Is there a way to retrieve items for multiple menus (header menu and footer menu) in a single query? Is there a way to use a single instance of 'menuItems' and use an array to specify the 'location' filter? For example:
menuItems(where: { locations: [MENU_10, MENU_11] }) or menuItems(where: [{ location: MENU_10 }, { location: MENU_11 }])
Or should I be using a different query type?
Many thanks for your help.
D
Beta Was this translation helpful? Give feedback.
All reactions