BuddyPress Scholar Theme CSS Editing

Hi Folks,

Can anyone please explain how the child theme editing works in the Scholar Theme?

Tammie, I hope you're able to continue helping me from the previous thread here.

This is what I want to achieve:

I want to manually edit a child or custom.css (whichever actually works), such that I can have control over element styles and so that I can update the parent theme without it overwriting my edits.

I have included a custom.css file in the child theme. Previously there was an import directive in the child style.css that pointed to a non-existent file. I activated the functions.php file...which seemed to do nothing (unfortunately though I can usually find my way around php, I am not a 'from scratch coder').

There were no imports in the Parent Theme style.css that pointed to anything in the child theme.

Currently it appears the edits from within the Custom Styles form are written to theme-options.php, which is in the Parent Theme folder...I can only assume that this would be overwritten during update?

I started editing the default.css template (via Custom Styles), so that it looks like mono.css theme...an extremely tedious process (given the few changes I want to make to the mono.css theme), which offers no capacity for styling elements and is made more difficult because the config. descriptions in the Custom Styles Menu correlate with neither Firebug or the CSS pages...so it's pretty much trial and error to find out what many of the styles actually are.

I would appreciate some clarification on this and I apologise in advance if I am missing the blatantly obvious :slight_smile:

Cheers

Stephen G

  • train4lifewpmu

    Oh, just an add-on...

    I've read the manual, watched the video and read the Parent Child Theme Page.

    Either I'm missing something obvious or something is wrong somewhere...

    e.g. Excerpt from What are Parent and Child Themes?' :

    "This technique can be used for any files and folders within the parent theme — but you must re-create the same folder and filenames structure in your child theme that exist in the parent theme folder."

    Call me a dummy, but it looks to me like they already are (except for the custom.css file which was missing in the child folder and empty in the parent anyway...but I added one to the child theme and put some code in and it didn't do anything). From my experience with other Child/Parent Themes, such relationships usually require the correct .php hooks don't they?

    Cheers again :stuck_out_tongue:

    Stephen G

  • Tammie

    @train4lifewpmu: I think you're getting a bit confused as to how parent and child themes work so let me explain.

    1. The same structure refers to if you want to add a php file that is in the parent or a .css one - you have to make sure they are in the same place.
    2. Any file you add MUST have a call if a .css file in the child style.css to even pick it up. For instance you added custom.css well the child style looks for the parent one not the child one so it will never pick it up.
    3. Child.css is where you put your custom edits it's already linked up in the child theme - you add your css changes to child.css in the CHILD theme not parent. It is under bp-scholar-child/_inc/css. Make sure though you have activated to use the CHILD theme when you do this.
    4. Functions.php is where you'd put your custom functions it will do nothing if you've not added a function.
    5. This is the same for any child / parent system not just particular to this theme and they never require php hooks you can simply just use css calls for the classes and ids which are xhtml / html not php.
    6. Just to be clear as I think you are confused a little: PHP is a programming language that 'does things' (this is in simple terms) where by it performs functions and so on, XHTML or HTML is the skeleton of your site and has classes and ids that are called by the CSS files (think of CSS like clothes and make up).

  • Tammie

    @train4lifewpmu: On second reading of this it seems you are really confused as to how parent and child themes work (this phrase lead me to believe this):

    There were no imports in the Parent Theme style.css that pointed to anything in the child theme.

    The child is the one you put edits in and the child is the one that by in the style.css of the child calls the parent template not the other way around. The parent is just there to give the blue eyes, tall gene - to put it in genetics terms which have a more 'real world' example. The child is the one that picks out the red hair dye :slight_smile:

    Also your point:

    Currently it appears the edits from within the Custom Styles form are written to theme-options.php, which is in the Parent Theme folder...I can only assume that this would be overwritten during update?

    Not at all. The way they work is by saving when you set a database variable (this will not get overwritten) that theme-options.php echos.. so overwrite as many times as you want and it will be safe just don't remove from the database which you shouldn't have need to.

  • train4lifewpmu

    Dear Tammie,

    Once again I can only thank you for your infinite patience and much appreciate perseverance.

    It would indeed appear that I'm very confused...perhaps it is because the child.css was the first thing I edited and nothing happened and I don't seem to be able to get it working?

    So, though it would no doubt be fruitful for me to continue my personalised workshop, I do not wish to completely monopolise your time...I've done enough of that already :stuck_out_tongue:

    So perhaps we could focus on why editing the child.css is not doing anything? If my understanding is indeed improving it would seem that if I can get that working then problem solved? :stuck_out_tongue:

    Many thanks again :slight_smile:

    Stephen G

  • train4lifewpmu

    Hi Tammy,

    Excerpt from second post above:

    "I've read the manual, watched the video and read the Parent Child Theme Page." :slight_smile:

    There are no longer any contents in the child.css...in fact I reinstalled the template yesterday just to make sure I didn't break something.

    Previously I have tried the following in the child.css:

    '#header-wrapper {
    background:url("mono-images/mono_header_background.png") repeat-x scroll 0 0 #FFFFF;
    }'

    and this:

    '#header-wrapper {
    background-color: #FFFFFF;
    }'

    And I have tried copying the entire mono.css into the child.css (along with a range of other edits). I have not been able to elicit any effect.

    What I have done since the new install is back-up my mono.css file and edit a copy directly. I figured that once we get this child.css working, that I can just copy it across thereafter.

    Oh! And in case it helps, I have activated the Child Theme only in 'Appearance>Themes' and have activated only the Child Theme in SIte Admin>Blogs>Edits etc (I have previously tried activating both child and parent here, without any detectable change).

    Thanks again for you assistance with this Tammie...I have to admit I'm getting curious :slight_smile:...and I'm happily up for having missed something simple :slight_smile:

    Cheers

    Stephen G

    PS In both installations, in the Child Theme's 'style.css' it imports 2 'custom.css' files. One from the Parent theme which is un-commented, and one from the Child Theme which is commented-out.

  • train4lifewpmu

    Hi Tammy,

    Excerpt from second post above:

    "I've read the manual, watched the video and read the Parent Child Theme Page." :slight_smile:

    There are no longer any contents in the child.css...in fact I reinstalled the template yesterday just to make sure I didn't break something.

    Previously I have tried the following in the child.css:

    '#header-wrapper {
    background:url("mono-images/mono_header_background.png") repeat-x scroll 0 0 #FFFFF;
    }'

    and this:

    '#header-wrapper {
    background-color: #FFFFFF;
    }'

    And I have tried copying the entire mono.css into the child.css (along with a range of other edits). I have not been able to elicit any effect.

    What I have done since the new install is back-up my mono.css file and edit a copy directly. I figured that once we get this child.css working, that I can just copy it across thereafter.

    Oh! And in case it helps, I have activated the Child Theme only in 'Appearance>Themes' and have activated only the Child Theme in SIte Admin>Blogs>Edits etc (I have previously tried activating both child and parent here, without any detectable change).

    Thanks again for you assistance with this Tammie...I have to admit I'm getting curious :slight_smile:...and I'm happily up for having missed something simple :slight_smile:

    Cheers

    Stephen G

    PS In both installations, in the Child Theme's 'style.css' it imports 2 'custom.css' files. One from the Parent theme which is un-commented, and one from the Child Theme which is commented-out.

  • train4lifewpmu

    Hi Tammy,

    Excerpt from second post above:

    "I've read the manual, watched the video and read the Parent Child Theme Page." :slight_smile:

    There are no longer any contents in the child.css...in fact I reinstalled the template yesterday just to make sure I didn't break something.

    Previously I have tried the following in the child.css:

    '#header-wrapper {
    background:url("mono-images/mono_header_background.png") repeat-x scroll 0 0 #FFFFF;
    }'

    and this:

    '#header-wrapper {
    background-color: #FFFFFF;
    }'

    And I have tried copying the entire mono.css into the child.css (along with a range of other edits). I have not been able to elicit any effect.

    What I have done since the new install is back-up my mono.css file and edit a copy directly. I figured that once we get this child.css working, that I can just copy it across thereafter.

    Oh! And in case it helps, I have activated the Child Theme only in 'Appearance>Themes' and have activated only the Child Theme in SIte Admin>Blogs>Edits etc (I have previously tried activating both child and parent here, without any detectable change).

    Thanks again for you assistance with this Tammie...I have to admit I'm getting curious :slight_smile:...and I'm happily up for having missed something simple :slight_smile:

    Cheers

    Stephen G

    PS In both installations, in the Child Theme's 'style.css' it imports 2 'custom.css' files. One from the Parent theme which is un-commented, and one from the Child Theme which is commented-out.

  • train4lifewpmu

    Hi Tammy,

    Excerpt from second post above:

    "I've read the manual, watched the video and read the Parent Child Theme Page." :slight_smile:

    There are no longer any contents in the child.css...in fact I reinstalled the template yesterday just to make sure I didn't break something.

    Previously I have tried the following in the child.css:

    '#header-wrapper {
    background:url("mono-images/mono_header_background.png") repeat-x scroll 0 0 #FFFFF;
    }'

    and this:

    '#header-wrapper {
    background-color: #FFFFFF;
    }'

    And I have tried copying the entire mono.css into the child.css (along with a range of other edits). I have not been able to elicit any effect.

    What I have done since the new install is back-up my mono.css file and edit a copy directly. I figured that once we get this child.css working, that I can just copy it across thereafter.

    Oh! And in case it helps, I have activated the Child Theme only in 'Appearance>Themes' and have activated only the Child Theme in SIte Admin>Blogs>Edits etc (I have previously tried activating both child and parent here, without any detectable change).

    Thanks again for you assistance with this Tammie...I have to admit I'm getting curious :slight_smile:...and I'm happily up for having missed something simple :slight_smile:

    Cheers

    Stephen G

    PS In both installations, in the Child Theme's 'style.css' it imports 2 'custom.css' files. One from the Parent theme which is un-commented, and one from the Child Theme which is commented-out.

  • train4lifewpmu

    Hi Tammie,

    I thought this might assist. It's today's error report from my server:

    '/**** [Sun Mar 28 08:12:44 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 08:12:32 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 08:12:21 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:55:04 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:55:00 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'
    [Sun Mar 28 07:54:54 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:48:07 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:48:03 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'
    [Sun Mar 28 07:47:58 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:47:37 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:47:32 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'
    [Sun Mar 28 07:47:26 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:46:57 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:46:52 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'
    [Sun Mar 28 07:46:46 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:45:51 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:45:48 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'
    [Sun Mar 28 07:45:45 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:45:41 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'
    [Sun Mar 28 07:45:32 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:17:04 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:16:56 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:16:21 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:13:53 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:13:48 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'
    [Sun Mar 28 07:12:56 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:12:51 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'
    [Sun Mar 28 07:12:00 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:11:56 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'
    [Sun Mar 28 07:09:10 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:09:05 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'
    [Sun Mar 28 07:07:14 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:07:08 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'
    [Sun Mar 28 07:07:04 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:06:32 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:06:27 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:06:20 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:06:16 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'
    [Sun Mar 28 07:06:08 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 07:05:56 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 06:48:57 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 06:48:17 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 06:47:40 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 06:47:33 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 06:47:27 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 06:46:34 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 06:46:19 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 06:38:02 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 06:37:43 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar/_inc/images/admin-menu-arrow.gif'
    [Sun Mar 28 06:37:41 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'
    [Sun Mar 28 06:24:53 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/favicon.ico'
    [Sun Mar 28 06:24:52 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/favicon.ico ***/'

    Cheers

    Stephen G

  • Tammie

    @train4lifewpmu: I think you are missing files as it's saying files do not exist. Make sure where you are calling the files and if they exist as by saying files do not exist somewhere you are linking to files that do not exist hence the repeated messages. You should have the following in your folder structure:

    wp-content/themes/bp-scholar/
    wp-content/themes/bp-scholar-child/

    And in BOTH of those all the files that they have when you unzip the folders from downloading the theme. Please remove any custom css you have and use the css provided incase something you are adding is causing issues.

    [Sun Mar 28 07:06:16 2010] [error] [] File does not exist: '/home/trainlif/public_html/wp-content/themes/bp-scholar-child/_inc/css/custom.css'

    That isn't even declared in the original so an edit you've done please when you asked to show all edits you've done mention it as you didn't when linked css. Can you copy you WHOLE css files into the posts please so I can view them for the child and for the parent.

  • Tammie

    @train4lifewpmu: I have just updated this theme to work with BuddyPress 1.2.3. However, I also think there is a bit of confusion over things here so whilst there is an update I want you to update the files and follow my instructions to see if this sets you on the right path:

    1. Download the latest version (2.1.6)
    2. Upload both the child and parent to wp-content/themes so you have wp-content/themes/bp-scholar-child/ and wp-content/themes/bp-scholar/
    3. Activate ONLY the child theme
    4. Set to mono
    5. In the child theme put the following only into child.css:

    #header-wrapper{
    background: #FFFFFF;
    border-bottom: 2px solid #333333;
    border-top: 2px solid #333333;
    }

    Don't do anything else just do that and tell me if it works please.

  • train4lifewpmu

    Hi Tammie :slight_smile:

    Just so we're clear:

    I did a complete new install yesterday as per instructions in the downloaded manual, on the website, in the video. I uploaded both folders, activated only the child theme and have only edited one file - 'mono.css'. There was no 'custom.css' in the child folder in either the first or second installation.

    Re: "Make sure where you are calling the files...": I am not calling anything...I haven't changed anything but the 'mono.css'.

    Re: "Please remove any 'custom css' you have and use the css provided incase something you are adding is causing issues.": as above. Though I don't think what I have added could be causing issues that existed before I did my edits. The child theme has never worked. It has never had a custom.css and I have not given it one. I have not added or removed any files. I have only made a copy of the original 'mono.css' and saved it in a different folder.

    Re: "That isn't even declared in the original so an edit you've done please when you asked to show all edits you've done mention it as you didn't when linked css.": I'm sorry I don't understand that..can you please rewrite/rephrase?

    Re: I can't copy the contents of the Parent Folder's css file as I can't open it... it is read-only. It was so in both installations as I mentioned earlier. I will copy my new 'mono.css' file into my next post.

    I'll just go and do this new install and see what happens.

    Thanks again for your help.

    Cheers

    Stephen G

  • train4lifewpmu

    Hi Tammie,

    I"m glad too....

    Being the kind of person that likes to know how things work, I must admit to being curious about what you did to fix it?

    Aside from the normal teething issues like this, which are to be expected, this template is quite a feat Tammie and you should be congratulated...I do hope it continues to evolve for a long time... :slight_smile:

    And I have a couple of suggestions for possible minor mods (though I appreciate that no mods are actually minor on a project of this kind), but I'll pop them up separately.

    Oh! And don't forget to rip those duplicated posts (above), out if you can...could be a bit terrifying for unsuspecting readers :slight_smile:

    Many thanks again...

    Cheers

    Stephen G

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.