Created
July 22, 2021 11:02
-
-
Save Pebblo/ece375ff854819cf900f91435ee67c76 to your computer and use it in GitHub Desktop.
Set the espresso_events post type show_in_rest arg to true.
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
<?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