Skip to:
Content
Pages
Categories
Search
Top
Bottom

Theme development woes

  • @sythenz

    Participant

    Hey there guys,

    I’ve been following Buddypress’ progress over the last few months and with the new theme development strategies in BP 1.8+ I’m finding it very difficult to develop my own theme.

    All the documentation on the BP Codex seems to either be outdated, or extremely vague and gives no guidance onto how to develop your own theme.

    The current way I’ve been developing is starting out with Eddie Machado’s bones and adding php files based on the Template Hierarchy, then calling Buddypress functions within the documents. As an example:

    
    <?php $ud = get_userdata( bp_displayed_user_id() ); ?>
    <div id="wrapper-main" class = "cf">
    <div id="profilesidebar">
    <?php bp_core_fetch_avatar( array( 'item_id' => $ud->ID,'type'=>'full','width'=>450,'height'=>450 ) ); ?>
    <?php echo $ud->user_login; ?>
    </div>

    Is this the correct way to go about developing a theme? and if not, where am I going wrong?
    – Sythen.

Viewing 10 replies - 1 through 10 (of 10 total)
  • @espellcaste

    Moderator

    I personally could not say, because you’re showing one random example. In my opinion, and experience with a project that I’m working on, the Codex has been very helpful and with good and solid information. Probably you’re doing something wrong, neither you could say that everything is wrong, just because you’re not being able to accomplish one particular task.

    @sythenz

    Participant

    My example is arbitrary, and has no particular action – rather my method in developing a theme is the question: i.e: is there a particular method in which I should be creating themes or is calling buddypress functions on a theme the correct method of use?

    @xerxex

    Participant

    μ–΄μ–΄
    으음

    @sythenz

    Participant

    ?

    @espellcaste

    Moderator

    I personally doesn’t create like that. I bring the files to my themes folder and edit them. This is better for upgrades and I won’t need to create pages.

    Example: If I want to have a custom Profile page, I would do the following steps:

    1 – Create a folder in my theme called, BuddyPress (wp-content/themes/my-theme/buddypress).
    2 – I would copy the profile file from the bp-legacy template in the BP plugin folder and would put in this BuddyPress folder in my template.
    3 – Edit the way I liked.

    It depends much of what you are trying to do, but this approach solved my problems in a more secure and future-friendly way.

    @sythenz

    Participant

    That actually resolves my question Renato, thank you very much πŸ™‚

    @espellcaste

    Moderator

    Great! Glad to help! =)

    @ernest8888

    Participant

    Hi
    I have a wordpress theme and I have two plugins one is buddypress v2.0.1 and the other is Commons In A Box that tells me that my theme is not buddypree compatible can you tell me what and where I should add to my theme that will make it buddypress compatible. I do understand that the way my theme looks and functions is up to me. I see 1000’s of buddypress themes what makes theme compatible and my’s not?

    EMac

    @espellcaste

    Moderator

    Hi @ernest8888,

    I’ve never used Commons In a Box, so I couldn’t say what kind of theme compatibility is necessary to work with it.

    I do think you’re using two plugins that perform the same thing, as far as I know about it, CIAB does what BuddyPress does, am I wrong?

    Also, check if there has to be some sort of organization in the template structure for it to work. That must likely be the problem in your case.

    @ernest8888

    Participant

    Hi Renato
    Thanks for your fast reply, yes you are right CIAB does the same as BuddyPress in a way, But it still needs Buddypress. I have looked at many really many BuddyPress theme, compaired them with non BuddyPress themes. I think I understand the template organization and have followed it. it is something else that I miss, I am thinking more on some type of code or function. That tells BuddyPress that I am a BuddyPress theme. I have seen code like this in many BuddyPress Parent themes
    if ( ! function_exists( ‘bp_dtheme_setup’ )
    function bp_dtheme_setup()
    add_theme_support( ‘buddypress’ );
    if ( function_exists( ‘bp_is_active’ ) )
    if ( bp_is_active( ‘friends’ ) )
    add_action( ‘after_setup_theme’, ‘bp_dtheme_setup’ );
    endif; Thing something here tell BuddyPress if a theme is a BuddyPress theme Or not
    I need to find out what that is and do it in a child theme. So that BuddyPress will now recognize my theme as a BuddyPress theme.
    If I get the message this is not a BuddyPress compatible theme what am I missing?

    Thanks
    EMac

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Theme development woes’ is closed to new replies.
Skip to toolbar