If you have a custom post type and want to enable the Genesis Layout and SEO settings on the Add New / Edit screens for it, use this snippet:
add_post_type_support( 'post_type_id', // e.g. product or portfolio
array(
'genesis-layouts',
'genesis-seo'
)
);
Or, you can also declare support for these features when registering a custom post type (hat tip to Chuck Smith in the comments).
add_action( 'init', 'codex_book_init' );
/**
* Register a book post type.
*
* @link http://codex.wordpress.org/Function_Reference/register_post_type
*/
function codex_book_init() {
$labels = array(
...
);
$args = array(
'labels' => $labels,
'description' => __( 'Description.', 'your-plugin-textdomain' ),
'supports' => array(
'title',
'editor',
'comments',
'genesis-seo',
'genesis-layouts',
'genesis-simple-sidebars',
'genesis-cpt-archives-settings'
),
);
register_post_type( 'book', $args );
}
Leave a Reply