Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Steps for theme compatibility not working


  • jugularbean
    Participant

    @jugularbean

    Hi,

    I’ve just installed Buddypress on my site. I’ve followed the instructions upto step 3.

    Now I downloaded the index.php from the activity folder and changed the HTML structure to match my theme’s structure. I reuploaded and refreshed the activity page, however the change is not visible.

    Also when I look at the code the change is not visible. I hope I’m making the changes to the right file.
    I’m working on the following path
    wp-content/themes/[themename]/activity/index.php

    Where could I be going wrong?

Viewing 10 replies - 1 through 10 (of 10 total)

  • @mercime
    Keymaster

    @mercime

    wp-content/themes/[themename]/activity/index.php = should be right.

    What WP theme are you using? Double check if your WP theme also has div with same ID e.g. div id=”content” showing up twice in HTML structure.


    jugularbean
    Participant

    @jugularbean

    I’m using “The Morning After”, free theme from woothemes.com

    The theme has the following div
    `

    `

    So I replaced the following two divs from the original activity/index.php
    `


    jugularbean
    Participant

    @jugularbean

    This is urgent and I’m willing to pay for support/help.


    @mercime
    Keymaster

    @mercime

    Just to clarify
    – Was “The Morning After” theme activated when you installed and activated the BP Template Pack plugin and ran Appearance > BP Compatibility?
    – Did you use the first method (16 template files change) or the second method (header-buddypress.php etc) to fix alignment? https://codex.buddypress.org/theme-development/wordpress-to-buddypress-theme/#tplfiles

    Open up TMA’s header.php, page.php and footer.php, copy source of each and post to pastebin.com. Click submit and post the generated URL/s here.


    jugularbean
    Participant

    @jugularbean

    @Mercime

    1. Yes the theme was already activated when I installed and activated the BP template pack and ran the BP Compatibility.
    2. I’ve been trying to use the first method without much success. To be honest I didn’t understand the 2nd method. After I change the filenames where do I save the new files (header-buddypress.php etc)?


    jugularbean
    Participant

    @jugularbean


    @mercime
    Keymaster

    @mercime

    @jugularbean Re #1 – thanks for clarifying, just had to make sure :-)
    2. You don’t change the filenames, you replicate the file/s and rename as header-buddypress.php etc and should be saved in root of your TMA theme folder.

    You’re in luck. We can use the second method to make TMA compatible with BuddyPress.

    1. Open up TMA’s header.php with text editor and Save As > header-buddypress.php in TMA theme folder

    2. Open up header-buddypress.php and add the following at the very end of the file:
    `<?php global $woo_options;
    //get_template_part( ‘top-banner’ );
    ?>

    `

    Save file.

    Note: if the global woo_options wreaks havoc, delete from the code

    3. Open up TMA’s sidebar.php and Save As > sidebar-buddypress.php in TMA’s theme folder

    4. Open up sidebar-buddypress.php

    a. At the very beginning of the file, insert
    `

    `
    b. At the very end of the same file, insert
    `

    `

    Save file.

    5. You might want to tweak the default styling of the BP template files. You can use the following style changes used in Twenty Ten theme as a guide https://codex.buddypress.org/theme-development/theme-dev-bp-template-pack-walkthrough-twenty-ten-bp-1-5/3/


    jugularbean
    Participant

    @jugularbean

    @mercime – great! it worked. Thanks a ton. Still some styling to do, but it’s working yay!

    Could you however help clarify why method 2 worked over 1. And how does method 2 work exactly?


    @mercime
    Keymaster

    @mercime

    Cool, glad it worked out for you :-)

    Method 1 works all the time for all WP themes, while method 2 works for some WP themes depending on HTML structure.

    Method 2 in short, uses the WP functions available for themes. Look at /activity/index.php and you’ll see header(‘buddypress’), sidebar(‘buddypress’) and footer(‘buddypress’) in the template files. If there’s a header-buddypress.php, in the WP/BP theme folder, then the BP template file would use header-buddypress.php. If there’s none, then the BP template file would use header.php by default.

    TMA works with either method 1 or method 2. I gave the solution for method 2 because the HTML structure of TMA was suitable for that. Method 2 saves you from having to “fix alignment” for 16 BP template files again (which you have to do in method 1) when the BP Template Pack plugin is upgraded.


    jugularbean
    Participant

    @jugularbean

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] Steps for theme compatibility not working’ is closed to new replies.
Skip to toolbar