Skip to:
Content
Pages
Categories
Search
Top
Bottom

Customize profiles

  • Avatar of barrera69
    barrera69
    Participant

    @barrera69

    Hello,
    My web is http://www.productesdemallorca.org and I would like to have only one tab in users profile showing their rtmedia album and profile info. Or at least only show the tabs of media and profile. I’ve tried without results.
    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    Put this in your theme functions.php

    define( 'BP_DEFAULT_COMPONENT', 'profile' ); 
     
    function mallorca_remove_profile_nav_tabs() {
       bp_core_remove_nav_item( 'activity' );
       //etc
    }
    add_action( 'bp_setup_nav', 'mallorca_remove_profile_nav_tabs', 100 );
    Avatar of barrera69
    barrera69
    Participant

    @barrera69

    Thanks for help, I tried this code before, when I put it on functions.php I have an error and the code apears at the head of the webside. When I try to put it on buddypress-functions.php I got nothing.
    I’m using the buddypress default theme.
    Thanks

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    What is the error, exactly?

    Paste the code below this
    <?php
    in functions.php

    Avatar of barrera69
    barrera69
    Participant

    @barrera69

    It gives me this error:

    Fatal error: Cannot redeclare mallorca_remove_profile_nav_tabs() (previously declared in /home/u571072146/public_html/wp-content/plugins/buddypress/bp-themes/bp-default/functions.php:7) in /home/u571072146/public_html/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress-functions.php on line 1313

    Thanks for your help

    Avatar of @modemlooper
    @modemlooper
    Moderator

    @modemlooper

    Never use buddy press-functions.php or functions.php to add these type of code snippets, use bp-custom.php

    http://codex.buddypress.org/plugindev/bp-custom-php/

    Avatar of barrera69
    barrera69
    Participant

    @barrera69

    Thanks for the tip

    I had the same error doing it with pb-custom-php

    Avatar of @modemlooper
    @modemlooper
    Moderator

    @modemlooper

    You cant have the same function in your code. place it in one location and remove the others

    Avatar of barrera69
    barrera69
    Participant

    @barrera69

    It works! thanks a lot for it.

    Now I’m trying to change the name of the tab “Media” (from rtmedia extension)
    I’ve used the code below without results, it works well with the other tabs, but not whit this one. I tried also to edit the .po file, because I’m ussing the extension qtranslate, but I can’t find where is the .po file that contains this tabs translation :

    function mb_profile_menu_tabs(){
    global $bp;
    $bp->bp_nav['media']['name'] = ‘productes';

    }
    add_action(‘bp_setup_nav’, ‘mb_profile_menu_tabs’, 201);

    ?>

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

You must be logged in to reply to this topic.