Skip to content

Snippet: Alter Any Post Type Archive To Display Like the Blog

add_filter( 'wpex_is_blog_query', function( $bool ) {
	if ( is_post_type_archive( 'events' ) ) {
		$bool = true; // Make events post type archive render like blog posts
	}
	return $bool;
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top