Skip to:
Content
Pages
Categories
Search
Top
Bottom

404 error when “suppressing” the Activity tab


  • jaumearagay
    Participant

    @jaumearagay

    Hi there! 🙂

    I want to suppress the whole Activity tab and Make the Profile the default tab. I’ve found code to do that but then I get a 404 error page when I click on a user’s link.

    This is the code I’ve found:

    /* *** */

    /* Remove Activity tab from profile */

    define( ‘BP_DEFAULT_COMPONENT’, ‘profile’ ); // Triem nova pestanya per defecte

    function bphelp_remove_activity_from_profile(){

    bp_core_remove_nav_item(‘activity’);
    }
    add_action(‘bp_activity_setup_nav’,’bphelp_remove_activity_from_profile’);

    /* *** */

    Is there something wrong or missing?

    Thanks in advance.

    Jaume.

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

  • danbp
    Moderator

    @danbp

    Perhaps check for quotes ? You use instead '

    The snippet will work by changing them.

    define( 'BP_DEFAULT_COMPONENT', 'profile' ); // Triem nova pestanya per defecte
    
    function bphelp_remove_activity_from_profile(){
    
    bp_core_remove_nav_item('activity');
    }
    add_action('bp_activity_setup_nav','bphelp_remove_activity_from_profile');

    jaumearagay
    Participant

    @jaumearagay

    I copied that code. You are right. One extra problem… Activity still exists in the upper right corner menu that pops from the user name. Any idea on how to hide/disable that?

    Thanks! 😉


    danbp
    Moderator

    @danbp

    See here if it helps ! 😉


    jaumearagay
    Participant

    @jaumearagay

    It does @danbp! 😉

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar