WordPress.org

Ready to get started?Download WordPress

Forums

Showing header and footer of root Blog into a "Child" Blog (7 posts)

  1. severus
    Member
    Posted 3 years ago #

    Mi problem is:

    I have this Multiblogging site: http://severus.es

    It order the Blogs like this: http://blog1.severus.es, http://blog2.severus.es, etc.

    Now, I would like to add a shop based in another WP theme: http://shop.severus.es.

    I need to keep the functionalities of the shop (content) but I would like to visually integrate the header and the footer of the main site (http://severus.es) on it.

    Switching off the header and footer is easy, the difficult point (for me) is how to make the functions get_header and get_footer to call the header and the footer of the main site and show then in the "shop site" so it get seamless integrated.

    Any idea?

  2. David Sader
    Member
    Posted 3 years ago #

    Replace

    <?php get_header(); ?>

    with

    <?php
    include( WP_CONTENT_DIR . '/themes/another_theme_folder/header.php' );
    ?>

    &etc ...

  3. those functions do not do what you;re hoping they do. :)

    You're going to have to cannibalize both themes. The easiest way is to make a child theme of the main blog's theme, and put in the guts of the shop theme.

  4. cavamondo
    Member
    Posted 3 years ago #

    Ok, just so you understand what im trying to do,

    Buddyress: Buddypress Default Theme
    Wordpress Multisite root: WP-CustomTheme
    Wordpres subsite: SubsiteTheme

    I wish for the subsites (SubsiteTheme) to get the header.php and the footer.php from the theme used in the Multisite Root (WP-CustomTheme).

    If i delete the header.php and footer.php of the SubsiteTheme, it fetches the header.php and footer.php from the Buddypress Default Theme.

    How can i make it fetch the header.php and footer.php from the WP-CustomTheme

  5. cavamondo
    Member
    Posted 3 years ago #

    <?php
    include( WP_CONTENT_DIR . '/themes/another_theme_folder/header.php' );
    ?>

    This solution works for me .. thx ^^

  6. severus
    Member
    Posted 3 years ago #

    Thanks for the interest,

    I have tested the proposed solution

    <?php
    include( WP_CONTENT_DIR . '/themes/another_theme_folder/header.php' );
    ?>

    but it shows a broken page. I suppose that the header of the "child blog" contains also calls to other .CSS files and those to other .CSS files and so on. In that case all those "sub-styles" are not loaded and the content is not showing correctly.

    In the other hand the header of the main blog call its own .CSS's files and in that case is also not showing as it should do.

    I will have to try the second option, creating a child theme. I will have to read about how to do it but I was something I wanted to do a long time ago since I was paying a deep integration with my BBPRESS forum (http://www.severus.es/foro). Something like that is what I want to do among the blogs

  7. severus
    Member
    Posted 3 years ago #

    Hi guys,

    I have solved the problem by doing a new header/footer on the child blog. They look exactly the same so, my users do not notice they have changed from http://severus.es to http:/shop.severus.es and viceversa (as long as they do not look at the URL).

    In that way I have integrated two themes in one keeping the functionalities of each one separated, which makes the site more flexible.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic