Created
August 24, 2013 20:21
-
-
Save blobaugh/6330219 to your computer and use it in GitHub Desktop.
Add custom post type to Jetpack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function tweakjp_allow_cpt( $allowed_post_types ) { | |
// my_cpt is the name of your <span class="hilite">Custom</span> <span class="hilite">Post</span> <span class="hilite">Type</span> | |
$allowed_post_types[] = 'my_cpt'; | |
return $allowed_post_types; | |
} | |
add_filter( 'rest_api_allowed_post_types', 'tweakjp_allow_cpt' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment