Skip to content

Instantly share code, notes, and snippets.

@farookibrahim
Created June 24, 2020 14:01
Show Gist options
  • Select an option

  • Save farookibrahim/9c5f087983fa292336ce438cb7b054bf to your computer and use it in GitHub Desktop.

Select an option

Save farookibrahim/9c5f087983fa292336ce438cb7b054bf to your computer and use it in GitHub Desktop.
Cartzilla - Load custom header for blog pages only
if( ! function_exists( 'cz_child_blog_header_static_content_id' ) ) {
function cz_child_blog_header_static_content_id( $static_content_id ) {
if ( is_home() || ( 'post' == get_post_type() && ( is_category() || is_tag() || is_author() || is_date() || is_year() || is_month() || is_time() ) ) ) {
$static_content_id = 100;
}
return $static_content_id;
}
}
add_filter( 'cartzilla_header_static_content_id', 'cz_child_blog_header_static_content_id', 99 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment