Skip to content

Instantly share code, notes, and snippets.

@Apina
Created December 9, 2014 07:38
Show Gist options
  • Save Apina/fbbcf04cfce29f503086 to your computer and use it in GitHub Desktop.
Save Apina/fbbcf04cfce29f503086 to your computer and use it in GitHub Desktop.
EE4 detect if it's an EE4 event or event archive
<?php if ( get_post_type( $post ) == "espresso_events" || is_post_type_archive( "espresso_events" ) ) {
//do something
} else {
//do something else
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment