Skip to content

Instantly share code, notes, and snippets.

@carmoreira
Created June 7, 2018 16:25
Show Gist options
  • Save carmoreira/2d59b7aa2393d133e55473c0bcd269d3 to your computer and use it in GitHub Desktop.
Save carmoreira/2d59b7aa2393d133e55473c0bcd269d3 to your computer and use it in GitHub Desktop.
Register Custom Post Type with YARPP support
function register_my_cpt() {
$args = array(
'public' => true,
'label' => 'Books'
'yarpp_support' => true,
);
register_post_type( 'book', $args );
}
add_action( 'init', 'register_my_cpt' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment