Skip to content

Genesis Developer Docs

Genesis REST API

Requires Genesis 3.1.0+

Genesis exposes meta data and settings to the WordPress REST API.

Genesis post meta

For post types with custom-fields support, Genesis exposes the title toggle, breadcrumbs toggle, featured image display status, layout, and body and post custom classes under the meta key in the posts endpoint:

> curl https://example.com/wp-json/wp/v2/posts/[id]

"meta": {
"_genesis_hide_title": false,
"_genesis_hide_breadcrumbs": false,
"_genesis_hide_singular_image": false,
"_genesis_custom_body_class": "",
"_genesis_custom_post_class": "",
"_genesis_layout": "full-width-content"
},

Genesis layouts

Access the supported layouts for the currently active theme via the Genesis layouts endpoint:

> curl https://example.com/wp-json/genesis/v1/layouts/site
{
"content-sidebar": {
"label": "Content, Primary Sidebar",
"img": "https://example.com/wp-content/themes/genesis/lib/admin/images/layouts/cs.gif",
"type": ["site"],
"default": true
},
"sidebar-content": {
"label": "Primary Sidebar, Content",
"img": "https://example.com/wp-content/themes/genesis/lib/admin/images/layouts/sc.gif",
"type": ["site"],
"default": false
},
"full-width-content": {
"label": "Full Width Content",
"img": "https://example.com/wp-content/themes/genesis/lib/admin/images/layouts/c.gif",
"type": ["site"]
}
}

Genesis singular images

Get post types with genesis-singular-images support enabled and active:

> curl https://example.com/wp-json/genesis/v1/singular-images
[
"post",
"page"
]

The absence of a post type denotes that genesis-singular-images support is not active for that type.

Genesis breadcrumbs

Get breadcrumbs options that are enabled:

> curl https://example.com/wp-json/genesis/v1/breadcrumbs
[
"breadcrumb_home",
"breadcrumb_front_page",
"breadcrumb_posts_page",
"breadcrumb_single",
"breadcrumb_page",
"breadcrumb_archive",
"breadcrumb_404",
"breadcrumb_attachment"
]

The values match the key for each breadcrumb toggle setting displayed in the Customizer.

The absence of a key denotes that breadcrumbs are not currently enabled for that area.