/

Themes

Learn about how to interact with Themes using WPGraphQL


Themes are a core tenant in every WordPress site. WPGraphQL exposes native ways to interact with Themes via GraphQL.

Privacy and AccessThe currently active theme is considered public as it'e exposed via the public style.css file, but additional installed themes that are not active are considered private and require WPGraphQL requests to be authenticated and for the requestor to have proper capabilities to see them. The examples below are public requests and will return the currently active theme but will not return additional installed themes.

Queries

Query all themes on the site:

GraphiQL Loading...

Query a specific theme by ID by replacing the ID below with an ID from the response above to query a specific theme:

GraphiQL Loading...

also see:

Mutations

Right now there are no Mutations related to Themes.

If anyone feels that adding mutations for themes, such as changing the active theme, installing new themes, or deleting themes should be added to WPGraphQL, open an issue and let's discuss.

Edit on GitHub

Themes

  • Queries
  • Mutations

Edit on GitHub

Discuss on Spectrum