WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] trouble calling different header.php for home.php

[Resolved] trouble calling different header.php for home.php

  • alexisfrsh
    Member

    @alexisfrsh

    I’m making a site that uses the same header.php for all pages except the blog/home.php. For this, I’ve created blog-header.php and am attempting to call it using the following:

    <?php if( is_page(15) ) {
    echo get_template_part( 'blog', 'header' );}
    else {
    echo get_header(); } ?>

    However, it doesn’t seem to be working. Any ideas on why that may be?

    (Unfortunately, the site isn’t live yet otherwise I’d provide a link.)

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] trouble calling different header.php for home.php’ is closed to new replies.