Custom Query Fields
This article covers Available data fields for your GraphQL queries where you define exactly which WordPress data fields will be available in your templates. All fields shown must be explicitly queried to become available.
How Custom Query Fields Work
Unlike built-in data sources, custom GraphQL queries give you complete control Pro Feature over which fields are available in your templates.
Single post example
- Query
- JSON
- Template
You query what you need:
{
post {
ID
post_title
featured_image {
file_url
alt_text
}
}
}
Data output in JSON format:
{
"post": {
"ID": 1,
"post_title": "Hello world!",
"featured_image": {
"file_url": "https://website.com/wp-content/uploads/2025/11/image-filename.jpg",
"alt_text": "Image description here"
}
}
}
Data tags added to your template:
<!-- Assuming you have named your query "custom" -->
<article>
<h1>
[[custom.post.post_title]]
</h1>
<img
src="[[custom.post.featured_image.file_url]]"
alt="[[custom.post.featured_image.alt_text]]" >
</article>
Loops Example:
- Query
- JSON
- Template
You query what you need:
{
posts_query (
arguments: { # define what to loop over
post_type: "post"
}
) {
posts { #define fields to make available in template
ID
post_title
featured_image {
file_url
alt_text
}
}
}
}
Data output in JSON format:
{
"posts_query": {
"posts": [
{
"ID": 1,
"post_title": "Hello world!",
"featured_image": {
"file_url": "http://latest.local/wp-content/uploads/2025/11/image-filename.jpg",
"alt_text": "Image description here"
}
}
]
}
}
Data tags added to your template:
<!-- Collection element data source: [[custom.posts_query.posts]] -->
<!-- Inside template: -->
<article>
<h1>
{{post_title}}
</h1>
<img src="{{featured_image.file_url}}" alt="{{featured_image.alt_text}}">
</article>
<!-- End template: -->
<!-- End Collection element -->
This article lists available fields. For detailed GraphQL query syntax and examples, see GraphQL Queries →
Understand the Tables
Table Columns
GraphQL Field - The field name used in your GraphQL query, this what you type in GraphQL editor
Description - What content this field returns when queried
Type - What kind of data this field returns
Template Usage - How to access this field in your templates after querying
Data Types Explained
String - Text content like "How to Build Better Websites" or "https://example.com/my-post"
Int - Whole numbers like post ID 142 or user ID 5
Array - Multiple items that require Collection elements for display
Object - Complex data with nested properties
Mixed - Variable content that depends on your custom field configuration
How to Use This Data
First: Add the field to your GraphQL query
Second: Use the resulting data in templates with square brackets [[custom.field]] or curly brackets {{field}} in Collection loops
Custom query availability - Only fields you explicitly query for will be available in your templates
Post Fields Reference
Assuming your custom data variable was called custom (unlike where built-in is called wp)
Standard Post Fields
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
ID | Post ID | Int | [[custom.post.ID]] or {{ID}} in loops |
post_title | Post title | String | [[custom.post.post_title]] or {{post_title}} in loops |
post_content | Post content | String | [[custom.post.post_content]] or {{post_content}} in loops |
post_excerpt | Post excerpt | String | [[custom.post.post_excerpt]] or {{post_excerpt}} in loops |
post_date | Publication date | String | [[custom.post.post_date]] or {{post_date}} in loops |
post_datetime | Publication datetime | String | [[custom.post.post_datetime]] or {{post_datetime}} in loops |
post_modified_date | Last modified date | String | [[custom.post.post_modified_date]] or {{post_modified_date}} in loops |
post_modified_datetime | Last modified datetime | String | [[custom.post.post_modified_datetime]] or {{post_modified_datetime}} in loops |
post_status | Post status | String | [[custom.post.post_status]] or {{post_status}} in loops |
post_type | Post type | String | [[custom.post.post_type]] or {{post_type}} in loops |
post_name | Post slug | String | [[custom.post.post_name]] or {{post_name}} in loops |
permalink | Post URL | String | [[custom.post.permalink]] or {{permalink}} in loops |
guid | Global unique identifier | String | [[custom.post.guid]] or {{guid}} in loops |
. | Current post wildcard (all available fields) | String | {{.}}, in loops only |
index | Current post order number | String | {{index}}, in loops only |
Featured Image Fields
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
featured_image.file_url | Image URL | String | [[custom.post.featured_image.file_url]] or {{featured_image.file_url}} in loops |
featured_image.alt_text | Alt text | String | [[custom.post.featured_image.alt_text]] or {{featured_image.alt_text}} in loops |
featured_image.caption | Image caption | String | [[custom.post.featured_image.caption]] or {{featured_image.caption}} in loops |
featured_image.title | Image title | String | [[custom.post.featured_image.title]] or {{featured_image.title}} in loops |
featured_image.description | Image description | String | [[custom.post.featured_image.description]] or {{featured_image.description}} in loops |
featured_image.sizes | Image size data | Mixed | [[custom.post.featured_image.sizes]] or {{featured_image.sizes}} in loops |
Post Author Fields
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
post_author.ID | Author ID | Int | [[custom.post.post_author.ID]] or {{post_author.ID}} in loops |
post_author.user_login | Author username | String | [[custom.post.post_author.user_login]] or {{post_author.user_login}} in loops |
post_author.display_name | Author display name | String | [[custom.post.post_author.display_name]] or {{post_author.display_name}} in loops |
post_author.first_name | Author first name | String | [[custom.post.post_author.first_name]] or {{post_author.first_name}} in loops |
post_author.last_name | Author last name | String | [[custom.post.post_author.last_name]] or {{post_author.last_name}} in loops |
post_author.user_email | Author email | String | [[custom.post.post_author.user_email]] or {{post_author.user_email}} in loops |
post_author.user_url | Author website URL | String | [[custom.post.post_author.user_url]] or {{post_author.user_url}} in loops |
post_author.description | Author bio | String | [[custom.post.post_author.description]] or {{post_author.description}} in loops |
post_author.avatar_url | Author avatar URL | String | [[custom.post.post_author.avatar_url]] or {{post_author.avatar_url}} in loops |
post_author.roles | Author roles | Array | [[custom.post.post_author.roles]] or {{post_author.roles}} in loops |
Custom Fields
| GraphQL Field Pattern | Description | Type | Template Usage |
|---|---|---|---|
price: acf_value(name: "price") | ACF field with alias | Mixed | [[custom.post.price]] or {{price}} in loops |
sku: meta_value(key: "product_sku") | Post meta with alias | Mixed | [[custom.post.sku]] or {{sku}} in loops |
weight: metabox_value(field_id: "weight") | MetaBox field with alias | Mixed | [[custom.post.weight]] or {{weight}} in loops |
Builderius offers full integration with Advanced Custom Fields and Meta Box custom field vendors. For detailed information about supported fields available to you out of the box visit:
For a detailed information about custom query integration visit:
Post Taxonomy Fields
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
categories_names | Post categories names | String | [[custom.post.categories.names]] or {{categories.names}} in loops |
categories_links | Post categories links | String | [[custom.post.categories.links]] or {{categories.links}} in loops |
tags_names | Post tags names | String | [[custom.post.tags.names]] or {{tags.names}} in loops |
tags_links | Post tags links | String | [[custom.post.tags.links]] or {{tags.links}} in loops |
categories | Post categories | Array | {{categories.name}}, in loops only |
categories | Post categories | Array | {{categories.slug}}, in loops only |
categories | Post categories | Array | {{categories.term_id}}, in loops only |
tags | Post tags | Array | {{tags.name}}, in loops only |
tags | Post tags | Array | {{tags.slug}}, in loops only |
tags | Post tags | Array | {{tags.term_id}}, in loops only |
User Fields Reference
Standard User Fields
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
ID | User ID | Int | [[custom.user.ID]] or {{ID}} in loops |
user_login | Username | String | [[custom.user.user_login]] or {{user_login}} in loops |
user_email | User email | String | [[custom.user.user_email]] or {{user_email}} in loops |
user_url | User website | String | [[custom.user.user_url]] or {{user_url}} in loops |
display_name | Display name | String | [[custom.user.display_name]] or {{display_name}} in loops |
nickname | Nickname | String | [[custom.user.nickname]] or {{nickname}} in loops |
first_name | First name | String | [[custom.user.first_name]] or {{first_name}} in loops |
last_name | Last name | String | [[custom.user.last_name]] or {{last_name}} in loops |
description | User bio | String | [[custom.user.description]] or {{description}} in loops |
avatar_url | Avatar image URL | String | [[custom.user.avatar_url]] or {{avatar_url}} in loops |
roles | User roles | Array | [[custom.user.roles]] or {{roles}} in loops |
capabilities | User capabilities | Array | [[custom.user.capabilities]] or {{capabilities}} in loops |
. | Current user wildcard (all available fields) | String | {{.}}, in loops only |
index | Current user order number | String | {{index}}, in loops only |
User Custom Fields
| GraphQL Field Pattern | Description | Type | Template Usage |
|---|---|---|---|
bio: acf_value(name: "bio") | ACF user field with alias | Mixed | [[custom.user.bio]] or {{bio}} in loops |
department: meta_value(key: "department") | User meta with alias | Mixed | [[custom.user.department]] or {{department}} in loops |
phone: metabox_value(field_id: "phone") | MetaBox user field with alias | Mixed | [[custom.user.phone]] or {{phone}} in loops |
Builderius offers full integration with Advanced Custom Fields and Meta Box custom field vendors. For detailed information about supported fields available to you out of the box visit:
For a detailed information about custom query integration visit:
Term Fields Reference
Standard Term Fields
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
term_id | Term ID | Int | [[custom.term.term_id]] or {{term_id}} in loops |
name | Term name | String | [[custom.term.name]] or {{name}} in loops |
slug | Term slug | String | [[custom.term.slug]] or {{slug}} in loops |
term_group | Term group | String | [[custom.term.term_group]] or {{term_group}} in loops |
term_taxonomy_id | Term taxonomy ID | Int | [[custom.term.term_taxonomy_id]] or {{term_taxonomy_id}} in loops |
taxonomy | Taxonomy name | String | [[custom.term.taxonomy]] or {{taxonomy}} in loops |
description | Term description | String | [[custom.term.description]] or {{description}} in loops |
count | Post count | Int | [[custom.term.count]] or {{count}} in loops |
parent | Parent term ID | Int | [[custom.term.parent]] or {{parent}} in loops |
children | Child terms | Array | {{children}} |
. | Current term wildcard (all available fields) | String | {{.}} |
index | Current term order number | String | {{index}} |
Term Custom Fields
| GraphQL Field Pattern | Description | Type | Template Usage |
|---|---|---|---|
icon: acf_value(name: "category_icon") | ACF term field with alias | Mixed | [[custom.term.icon]] or {{icon}} in loops |
color: meta_value(key: "term_color") | Term meta with alias | Mixed | [[custom.term.color]] or {{color}} in loops |
banner: metabox_value(field_id: "banner") | MetaBox term field with alias | Mixed | [[custom.term.banner]] or {{banner}} in loops |
Builderius offers full integration with Advanced Custom Fields and Meta Box custom field vendors. For detailed information about supported fields available to you out of the box visit:
For a detailed information about custom query integration visit:
Archive Fields Reference
Archive Information
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
title | Archive title | String | [[custom.archive.title]] |
description | Archive description | String | [[custom.archive.description]] |
type | Archive type | String | [[custom.archive.type]] |
search_keyword | Search term (search archives) | String | [[custom.archive.search_keyword]] |
Archive Related Objects
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
term | Archive term object | Object | [[custom.archive.term]] |
author | Archive author object | Object | [[custom.archive.author]] |
posts_query | Archive posts | Object | [[custom.archive.posts_query.posts]] |
Navigation Menu Fields Reference
Menu Item Fields
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
ID | Menu item ID | Int | {{ID}} |
title | Menu item title | String | {{title}} |
url | Menu item URL | String | {{url}} |
description | Menu item description | String | {{description}} |
classes | Menu item CSS classes | String | {{classes}} |
target | Link target attribute | String | {{target}} |
object_id | Referenced object ID | Int | {{object_id}} |
children | Child menu items | Array | {{children}} |
. | Current item wildcard (all available fields) | String | {{.}} |
index | Current item order number | String | {{index}} |
Menu Item Custom Fields
| GraphQL Field Pattern | Description | Type | Template Usage |
|---|---|---|---|
icon: acf_value(name: "menu_icon") | ACF menu item field | Mixed | {{icon}} |
badge: meta_value(key: "menu_badge") | Menu item meta | Mixed | {{badge}} |
Builderius offers full integration with Advanced Custom Fields and Meta Box custom field vendors. For detailed information about supported fields available to you out of the box visit:
For a detailed information about custom query integration visit:
Site-Wide Fields Reference
Site Information
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
option_value(name: "blogname") | Site title | String | [[custom.site_title]] (if aliased) |
option_value(name: "blogdescription") | Site tagline | String | [[custom.site_tagline]] (if aliased) |
option_value(name: "siteurl") | Site URL | String | [[custom.site_url]] (if aliased) |
current_url | Current page URL | String | [[custom.current_url]] |
Utility Functions
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
url_param: url_parameter(name: "search") | URL parameter with alias | Mixed | [[custom.url_param]] |
user_cookie: cookie_parameter(name: "user_pref") | Cookie value with alias | Mixed | [[custom.user_cookie]] |
server_info: server_parameter(name: "HTTP_HOST") | Server variable with alias | Mixed | [[custom.server_info]] |
calc_result: expression_result(expression: "2 + 2") | Expression result with alias | Mixed | [[custom.calc_result]] |
wp_function: php_function_output(function: "wp_get_theme") | PHP function output with alias | Mixed | [[custom.wp_function]] |
Site Options & Custom Fields
| GraphQL Field Pattern | Description | Type | Template Usage |
|---|---|---|---|
contact_email: acf_value(name: "contact_email") | ACF options field | Mixed | [[custom.contact_email]] |
footer_text: option_value(name: "custom_footer") | WordPress option | Mixed | [[custom.footer_text]] |
logo: metabox_value(field_id: "site_logo", option_name: "site_settings") | MetaBox options field | Mixed | [[custom.logo]] |
URL Helper Functions
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
front_page_url | Homepage URL | String | [[custom.home_url]] (if aliased) |
posts_index_page_url | Blog index URL | String | [[custom.blog_url]] (if aliased) |
page_url(name: "about") | Page URL by slug | String | [[custom.about_url]] (if aliased) |
post_url(name: "hello-world") | Post URL by slug | String | [[custom.post_url]] (if aliased) |
category_archive_url(slug: "news") | Category archive URL | String | [[custom.news_url]] (if aliased) |
author_archive_url(username: "admin") | Author archive URL | String | [[custom.author_url]] (if aliased) |
Form Functions
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
contact_url: form_submission_url(form: "contact") | Form action URL with alias | String | [[custom.contact_url]] |
contact_nonce: form_nonce(form: "contact") | Form security nonce with alias | String | [[custom.contact_nonce]] |
Hook Functions
| GraphQL Field | Description | Type | Template Usage |
|---|---|---|---|
hook_data: hook_argument(position: 0) | WordPress hook argument with alias | Mixed | [[custom.hook_data]] |