Skip to:
Content
Pages
Categories
Search
Top
Bottom

trying to get main domain header to match subdomain header

  • Avatar of Hally47
    hally47
    Participant

    @hally47

    Hello guys I have a main domain that uses buddypress as its theme howeever. I create subdomain. like members2.dstars.com however I find the subdomain header user the subdomain if I press the home link and I want it to go to main domain which is dstars.com. So my question is there a way for me to make the header.php file match the header.php of the subdomain?

Viewing 1 replies (of 1 total)
  • Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    You will have to have a separate theme for your subdomain, and hard-code the links to go back to your root domain.

    The way I did this, was to have a “buddypress-home” theme, and a “buddypress-sub” theme. The sub theme is basically a copy of all of the files from the “buddypress-home” theme, but without home.php, an edited style.css to change the name of the style, and a modified header.php which I will explain below.

    The home theme is activated only for the root blog, the sub theme for all others.

    In the header.php file for the sub blogs, I used $bp->root_domain as the destination for each link, plus whatever slug was appropriate (MEMBERS_SLUG, BP_GROUPS_SLUG, BP_BLOGS_SLUG).

    I also went ahead and made the BP_BLOGS_SLOG link class="selected" right away, that way when you’re in a sub blog, the appropriate tab is always shown as selected.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.