can't get the BP-Social Child theme working

I edited the child css file to be placed in the bp-social-child\_inc\css dir like so :

Theme Name: bp-social-child
Theme Date: 16/06/2010
Version: 1
Theme URI:
Description: Child theme for the Default BuddyPress 1.2 theme
Author: Charlie
Author URI:
Tags: buddypress, three column,
Template: bp-social

/* Inherit the default theme styles */
@import url( ../../plugins/buddypress/bp-themes/bp-social/_inc/css/default.css );
/* Inherit the default theme adminbar styles */
@import url( ../../plugins/buddypress/bp-themes/bp-social/_inc/css/adminbar.css );
/* Child Styles */
@import url( _inc/css/child-style.css );

I then placed an edited version of top-header.php in the root of the bp-social-child dir.
(It was edited to include an "fb connect" button. )
I also edited some simple text, to make sure it wasn't my php that was at fault.

I could see no changes.

I then found this post and tried his instructions :

So the steps towards customization the buddypress social theme so that you can modify the theme_options style output for you site are:

1. copy the theme_options file to your child theme.
2. copy the header.php file to your child theme and edit it to point to:
instead of:
3. Make sure that you rename functions-sample.php to functions.php.

the functions.php was already called functions.php
I replaced "stylesheet" with "template" in the php file I had made changes to, top-header.php

It didn't help.
What am I doing wrong?

  • Tammie

    @hkcharlie: If it is new php you have to write the php and have in the child theme then you have to add the new class in the child theme. I know you seem to have an issue with video tutorials but that was why I linked the child and parent tutorial as this explained it. Now, whether you have a class conflict / something not being picked up that could be the problem. Can you perhaps explain the php and then the css you are trying to do as again I'm left with half the picture which makes for a long diagnosis when I want to clear this up for you.

    When you say fresh you mean without doing those instructions you linked? Also is it wordpress (what vesion) or wpmu / buddypress? I just want to be clear.

  • Tammie

    @hkcharlie: Just in case confusion here I just went onto the social theme in my own testing (2.9.2 wpmu / buddypress) here were my steps:

    1. Activated child and didn't activate parent as don't need to
    2. Opened up child theme in a text editor and add for instance this in the child-style-sample.css:

    #top-bar {
    background:none repeat scroll 0 0 #cccccc;
    border-bottom:1px solid #D8DFEA;

    What I did was pick a visible element there that I knew I could 'see' the effect of namely the header.

    I have changed the background colour it wasn't cccccc before.

    3. Save that up as child-style.css

    There you go the css works.

    The same principle works for the child.css if you have a new style or something like that. I did not change the style.css for the child or anything like that all I did was just add the styles to the child-style.css.

  • hkcharlie

    it is 2.9.2 wpmu / buddypress all the latest versions.
    It is a fresh install in so much as the only changes I have tried to do with the theme have been through the child theme system and so I have not touched any of the parent files.
    Therefore anything I have tried only needs to be deleted and were back to square one!

    My php modification is an even more simple one than your example, just to see if I can get this system to work.
    I have an edited version of top-header.php in the root of my child theme dir.
    the origional reads from line 33 :
    <?php if($tn_buddysocial_message_text == '') { ?>
    <h1>Welcome to ..........

    It is the intro message on the home page.
    So I have tried to change this to "Welcome to test site ............"

    On top of this I tried to add the line under this :
    <?php do_action('fbc_display_login_button') ?>
    I had this working with another theme before, so I am sure the php is right.
    It is to add a facebook connect button, working in conjunction with a plugin.

    The php file is edited and in the child root dir.
    Are you saying that there needs to be an edit in the child-style.css in the bp-social-child\_inc\css that references my php file in the child root?

    Or do you not need a new php file at all in the child theme dir?

    I have looked at your example and the "top-bar" you reference to at the top, I assume is the php file?
    I have looked at the top-bar.php and there are no references within that file to which you are refering, so now I am completely lost by your example.

  • Tammie

    @hkcharlie: I think we have a little crossed wires here...

    I was calling a id which is a html element in the css and styling it by changing the background colour there was no PHP at all in that infact that is not the way you would change PHP.

    That aside... I think the problem may be what I originally said about STYLESHEETPATH and TEMPALTEPATH in the other thread.

    If you are looking to use your version of top-header.php you want to make sure in the parent theme any reference that calls top-header.php calls STYLESHEETPATH not TEMPLATEPATH for instance in header.php:

    <?php if( !is_user_logged_in() ) { load_template (TEMPLATEPATH . '/top-header.php'); } ?>

    this would become:

    <?php if( !is_user_logged_in() ) { load_template (STYLESHEETPATH . '/top-header.php'); } ?>

    CSS files are for CSS not for PHP I think there is some confusion over that.

  • hkcharlie

    I have looked at the top-header.php and there isn't any reference to "TEMPLATEPATH" other than right at the top all by itself (I tried changing this and it made no difference, so I changed it back again)

    Am I right in saying that to use php in the child theme, I place the edited php file in the same directory as the parent, but within the child theme and that is it?

    Thanks for your time Tammie!

  • gsojourner

    Crap, guess I won't get a response till Monday or so....

    I just loaded a fresh copy and all I get is a white screen when I preview either the parent or child theme for BuddySocial. I downloaded three times to see if I was doing something wrong. I used the same process I used for any other BP themes I downloaded that worked. I have not made any code changes to the theme at all. Any recommendations.

  • Tammie

    @gsojourner: A link to your site, what you are running and also the install path you put the files on would be great to know in order to diagnose your issue. Have you under wp-content/themes got:


    Also please note that we prefer you start a new topic for new threads and this is a new one so please do not respond onto someone's thread just create a new topic and we can deal with the matter for you without confusion. It makes for a far easier to support forum keeping topics clean I hope you understand.

  • Richie_KS

    hi hkcharlie
    from parent theme (bp-social)
    open header.php and edit line 174+

    <?php if($bp_existed == 'true') { ?>
    <?php if ( !bp_is_register_page() && !bp_is_activation_page() ) { ?>
    <?php if( !is_user_logged_in() ) { load_template (TEMPLATEPATH . '/top-header.php'); } ?>
    <?php } ?>
    <?php } else { ?>
    <?php if( !is_user_logged_in() ) { load_template (TEMPLATEPATH . '/top-header.php'); } ?>
    <?php } ?>


    <?php if($bp_existed == 'true') { ?>
    <?php if ( !bp_is_register_page() && !bp_is_activation_page() ) { ?>
    <?php if( !is_user_logged_in() ) { locate_template ( array ( 'top-header.php' ), true); } ?>
    <?php } ?>
    <?php } else { ?>
    <?php if( !is_user_logged_in() ) { locate_template ( array ( 'top-header.php' ), true); } ?>
    <?php } ?>

    and see if any edit to top-header.php take effect..

    one of know issue with using load_template with TEMPLATEPATH vs locate_template (array());
    i don't think STYLESHEETPATH will work tho...update here again ok.

  • hkcharlie

    I'm still getting nothing here.
    Right Tammie, I read what you said (slowly this time) and made the necessary changes to the header.php and still I can't get my php in there.

    Very simply, I've even taken to editing the parent php files to add a fb connect button.
    From the fb developer page I have added the code

    <?php do_action('fbc_display_login_button') ?>

    to top-header.php in the area of the login and sign-up boxes.
    I've tried it with the above mentioned edit and I've tried it without (ie: the "virgin" php files)
    It just does not show and I can't see why.

  • Tammie

    @hkcharlie: If you are adding that code to the parent and it is not working you will need to contact the developer as that is third party code and I suspect something is up with it not the theme in that case. I am not saying the code is wrong at all I am saying perhaps how it's being called or set up. A good method to test would be for you to try adding that line into the default BuddyPress theme - if it works just post back here as it's theme related then. If it doesn't there is something wrong with the implementation.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.