add_action( 'astra_content_before', 'my_custom_entry_hook_function', 10);
if (! function_exists( 'my_custom_entry_hook_function' )){
function my_custom_entry_hook_function() {
if(is_post_type_archive('espresso_events')){
add_action( 'astra_entry_content_blog', 'astra_entry_content_event_template' );
remove_action( 'astra_entry_content_blog', 'astra_entry_content_blog_template');
# remove_action( 'astra_entry_content_blog', array( \Astra_Loop::get_instance(), 'astra_entry_content_blog_template'));
}
}
}
if ( ! function_exists( 'astra_entry_content_event_template' ) ) {
function astra_entry_content_event_template() {
get_template_part( 'template-parts/blog/event-layout' );
}
}
-
-
Save lorenzocaum/6eb0daad8ce58cfd83f6c6fc327d1e6a to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment