Skip to content

example: Querying menus for themes with no menu locations #88

Open
@colinmurphy

Description

@colinmurphy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    🆕 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions