Re: New theme framework and exisiting WP themes
I am trying to achieve the 3 layer approach suggested by outolumo, which looks ideal to me.
I just got a serious inheritance problem…!
Because I need to integrate BuddyPress in a section of a site and not having it run as a whole site, I am testing this set up:
1) The original “WP Theme” as a parent (with just the code in post #2 from Andy, in “header.php”)
2) The “bp-sn-parent” folder stripped out of reduntant files that are already in “WP theme”, keeping just BP folders and “optionsbar.php”, “plugin-template.php”, “userbar.php”, and “style.css”.
Made this theme a child of WP Theme, declaring “Template: wp-theme” in the stylesheet, right?
3) The “bb-default” theme for styling (skinning) and customization.
I’ve declared “Template: bp-sn-parent” so that “bb-default” is a child of “bp-sn-parent”, which is a child of “wp-theme”.
So:
1)”wp-theme” is the parent.
2) “bp-sn-parent” is the child of “wp-theme” (style.css declares: Template: wp-theme).
3) “bb-default” is the child of “bp-sn-parent” (style.css declares: Template: bp-sn-parent).
First problem:
The “bb-default” theme is not showing up in the backend under “Site Admin/Themes”, so I cannot make it available in “Apperance/Themes” to activate it.
If I put a blank “index.php” file in “bp-sn-parent”, than it does show up in the backend, so I can activate it. (Is that normal?)
So, before activating the “bb-default” theme (which should refer to “bp-sn-parent” which should refer to “wp-theme”), I’ve edited the “style.css” in the “bb-default” theme to import the styles from “wp-theme” (because it styles the whole site) with this rule:
@import url( ../wp-theme/style.css );
The result is a that the homepage (normal site) is blank, and the BuddyPress section is there, but messed up and not skinned with “bb-default” styles, and only some styles from “wp-theme” are applied (the footer image is there, but not the header image).
Now, if I go and I activate the “bp-sn-parent” theme, the homepage of the site shows up normally, and the BuddyPress section has some “bb-default” styles and got the header images from the “wp-theme” but not the footer image. And it’s preatty screwed up too.
So, as you see I am trying to achieve this 3 layers set up, but as I said, something with inheritance is totally messed up.
Does anybody have any insights on this. I am sure it could be useful for the whole community.
Thanks.