wpengine / wpengine/hwptoolkit
example: Querying menus for themes with no menu locations
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 47
- Forks
- 3
- Avg merge
- 1m
- Merged PRs (30d)
- 19
Description
Background
If you try and query for any type of menu when building an example for some of the latest WP themes (e.g. Twenty Twenty Five) they don't have menu locations. See - https://www.wpgraphql.com/docs/menus
So the below query returns no menus
query Menu {
menus {
nodes {
id
databaseId
name
menuItems {
edges {
node {
id
label
parentId
}
}
}
}
}
}
We should look at adding examples on how a user can query menus for themes with no menu locations maybe through an example plugin in the example.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the menus documentation at https://www.wpgraphql.com/docs/menus and the existing example query in this issue. Then inspect the repository's example area to determine how an example plugin can support themes without menu locations. Done means the examples demonstrate how to query menus for those themes and the documented query returns useful results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100