Forums

using a shared header (1 post)

  1. nessler
    Member
    Posted 1 year ago #

    I already have an existing site and built two blogs (seperate installations), which got integrated as news and diary sections.

    I have started using an external header, using php, transforming the entire site from html to php, so that when I change something in the header I have to do it in just one file instead of a hundred.
    This is the centralized php header file: http://www.fortherestless.com/header-external.php

    Now, the two blogs I have also use their own header from the theme, and when I try to do use the external header here I run into problems.

    The page is called news.php, and the entire header section I replaced with this: <?php include('http://www.fortherestless.com/header-external.php');?>

    On the news.php page, the blog is then called with the short and sweet code
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('c:\\domains\\fortherestless.com\\wwwroot\\forms\\newz\\wp-blog-header.php');
    ?>

    When I view the page the collapse expand scripts stops working, and I saw that the header of the theme is also loaded, thus placing two headers files into the php, so I guess this is why it is not working.

    I tried integrating the two, but keep on failing miserably.
    Anybody know how to solve this simply ?

    Here's the code in a text file for the news.php file.
    Clearly visible is the second header function...
    located here on my server: http://www.fortherestless.com/forms/newz/wp-content/themes/wpthemegen/header.php

    thanks in advance for tips...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.