Hi again,
I managed to find a workaround and thought I’d share it with the community.
If anyone else has any suggestion to final solution or alternative feel free to share it.
Main menu items will be managed by WordPress Backend > Appearance > Menus and all remaining items I have created a parent page and sub-pages assigned to parent with specific keywords assigned to parent/sub pages.
From there I created the following sample query which works for me
{
pages(
where: {search: "random keyword", parent: "1", orderby: {field: MENU_ORDER, order: DESC}}
first: 11
) {
nodes {
title
parentId
slug
}
}
}
This will query 10+ pages and return page title, parentid and slug which is perfect for my case use in making a nav menu with more than ten items.
Hope this helps someone!
Edit: After replying, looked deeper into my previous queries and found a much more easier solution.
See query below:
query graballmenuitems {
menus(where: {id: 1}) {
edges {
node {
menuItems(first: 11) {
edges {
node {
label
}
}
}
}
}
}
}
-
This reply was modified 2 years, 5 months ago by ogwebchef.
-
This reply was modified 2 years, 5 months ago by ogwebchef. Reason: typos
-
This reply was modified 2 years, 5 months ago by ogwebchef. Reason: Found a simpler solution
-
This reply was modified 2 years, 5 months ago by ogwebchef. Reason: bold edit