Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Set the espresso_events post type show_in_rest arg to true.
<?php // Please do not include the opening PHP tag if you already have one.
function tw_ee_set_show_in_rest_on_espresso_events( $args, $post_type ) {
if ( 'espresso_events' === $post_type ) {
$args['show_in_rest'] = true;
return $args;
add_filter( 'register_post_type_args', 'tw_ee_set_show_in_rest_on_espresso_events', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment