Skip to content

Instantly share code, notes, and snippets.

@shawncampbell
Last active September 3, 2015 03:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawncampbell/c778f273b1782471a0b4 to your computer and use it in GitHub Desktop.
Save shawncampbell/c778f273b1782471a0b4 to your computer and use it in GitHub Desktop.
Add YARPP support to WordPress custom post types created with WPMU DEV CustomPress
/**
* CustomPress YARPP Support
*
* Add YARPP support to WordPress custom post types created with WPMU DEV CustomPress
*/
add_action( 'registered_post_type', 'my_custom_post_type_yarpp_support', 10, 2 );
function my_custom_post_type_yarpp_support( $post_type, $args ) {
// Optionally specify a single custom post type
//if ( 'my_custom_post_type' === $post_type ) {
global $wp_post_types;
$args->yarpp_support = true;
$wp_post_types[$post_type] = $args;
//}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment