-
-
Save flexseth/ff1f9881c2d069c2f9cc to your computer and use it in GitHub Desktop.
Whitelist a Wordpress custom post type for use with the Jetpack JSON API using the `rest_api_allowed_post_types` filter.See http://developer.wordpress.com/docs/api/1/get/sites/%24site/posts/
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 fp_allow_my_post_types($allowed_post_types) { | |
$allowed_post_types[] = 'tribe_events'; | |
return $allowed_post_types; | |
} | |
add_filter( 'rest_api_allowed_post_types', 'fp_allow_my_post_types'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment