Support » Themes and Templates » use one header.php for multi site

  • Resolved strandcreative



    We have a WordPress installation in the root directory.
    We are then having another 5 WordPress installs in different directories on the server so we can have different branches managing different content with separate logins.

    If we make changes to the header.php on the main site in the root, we woiuld like this to update on all the other 5 installs via an include file function. I’ve tried to use the include function to bring in the header.php from the URL but it doesn’t work. Can you use a specific URL in the include function?


    Is there an easier method that I’m missing where we can get those changes to update on all the other installs via one header.php template?

Viewing 1 replies (of 1 total)
  • include (TEMPLATEPATH . '/header.php');

    or if you whant one header per blog use something like this :

    // Exenple whith :
    // ID Web name Site 1 = 1 << First Blog (principal)
    // ID Web name Site 2 = 2
    // ID Web name Site 3 = 3
    // ID Web name Site 4 = 4
    // Get current Blog ID
    $blog_id = get_current_blog_id();
    // Get Theme directory url
    // Make conditions
    if     ($blog_id =="2"){include (TEMPLATEPATH . '/header2.php');}
    elseif ($blog_id =="3"){include (TEMPLATEPATH . '/header3.php');}
    elseif ($blog_id =="4"){include (TEMPLATEPATH . '/header4.php');}
    else { include (TEMPLATEPATH . '/header.php');} // Else = ID 1 - First Blog

Viewing 1 replies (of 1 total)
  • The topic ‘use one header.php for multi site’ is closed to new replies.