Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
// The list of post types that we want to require post titles for
$post_types = array( 'post', 'page', 'event', 'project' );
// If the current post is not one of the chosen post types, exit this function
if ( ! in_array( $post->post_type, $post_types ) ) {
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment