Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Adding new Profile Tab loses style (1.7)

  • @amccaleb

    Participant

    Hi There,

    I am attempting to add a “Favorites” tab to my User Profile pages so they can favorite posts. I have the favorite part down, but clicking the new Profile Tab loses all Profile styling. I believe I am running into a template issue… but after 2 days of researching I am at a lost.

    I followed this to create a new Tab on the profiles:
    http://codex.themedelta.com/how-to-create-a-new-tab-in-buddypress-member-page/

    The Tab shows up, but once clicked I lose all profile styling. I have attempted to rebuild the files in both the child theme folder (in a “buddypress” folder”) and have tried using bp-custom.php in the plugins folder as well as functions.php in the child theme folder.

    You can see the tab here: http://www.posters.io/members/admin/
    But once clicked, the profile is gone: http://www.posters.io/members/admin/favorites/

    Is this just a styling issue? Ideally, clicking “Favorites” would react just like clicking “Friends” or “Settings” – only the bottom half of the Profile would change (populated by the favorited posts)

    I feel comfortable styling with CSS, but I feel like I am running into a template issue.

    Thanks in advance! really appreciate any help or guidance.

Viewing 7 replies - 1 through 7 (of 7 total)
  • @modemlooper

    Moderator

    That example is outdated for BP 1.7

    This
    bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘members/single/plugins’ ) );

    should be

    bp_get_template_part( ‘members/single/plugins’ );

    @amccaleb

    Participant

    Hi @modemlooper, thanks for the quick response.

    I am now getting a 404 Page Not Found when I make that change.
    http://www.posters.io/members/admin/favorites/

    I have these functions in the bp-custom.php inside the plugins folder.

    __(‘Favorites’, ‘buddypress’),
    ‘slug’ => ‘favorites’,
    ‘position’ => 75,
    ‘show_for_displayed_user’ => true,
    ‘screen_function’ => ‘all_conversations_link’,
    ‘item_css_id’ => ‘all-conversations’
    ));
    print_r($wp_filter);
    }
    function all_conversations_link () {
    //add title and content here – last is to call the members plugin.php template
    add_action( ‘bp_template_title’, ‘my_groups_page_function_to_show_screen_title’ );
    add_action( ‘bp_template_content’, ‘my_groups_page_function_to_show_screen_content’ );
    bp_get_template_part( ‘members/single/plugins’ );
    }

    function my_groups_page_function_to_show_screen_title() {
    echo ‘My new Page Title’;
    }
    function my_groups_page_function_to_show_screen_content() {
    echo ‘My Tab content here’;
    mfp_display();

    }
    add_action( ‘bp_setup_nav’, ‘my_bp_nav_adder’ );
    ?>

    Thanks again

    @modemlooper

    Moderator

    @amccaleb

    Participant

    Worked perfectly, thanks again!

    @tp5277

    Participant

    @modemlooper thx for the post it works great on my site. I am a novice to code for buddypress but with this new tab I created how do I use in a way that each member has a map…this is the data I would like to use for the new tab.

    @jalejo08

    Participant

    Hi @modemlooper, please, can you upload again the example to do it compatible with BP 1.7+
    i’m finding an example that works, but It is difficult

    @mboghen

    Participant

    Guys, the gist is no longer available. @modemlooper can you recover it?
    cheers

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Adding new Profile Tab loses style (1.7)’ is closed to new replies.
Skip to toolbar