Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Remove the ”visit” link from the buddypress admin bar…

  • @tdmc123

    Member

    Hi all

    I wanted to get rid of the ”Visit” link on the buddypress admin bar.

    What i did was ghoing into the bp-core-adminbar.php and changed the:

    add_action( ’bp_adminbar_menus’, ’bp_adminbar_random_menu’, 100 );

    to…

    remove_action( ’bp_adminbar_menus’, ’bp_adminbar_random_menu’, 100 );

    The ”Visit” link is now gone and I haven’t done anything else, is this correct or is there anything else I need to do?

    Please advise

    Regards
    T

Viewing 4 replies - 1 through 4 (of 4 total)
  • @mercime

    Participant

    It is correct. :-)

    @pcwriter

    Participant

    @tdmc123

    Actually, the remove_action code is correct. But you should avoid modifying core Buddypress files if and when possible to prevent having to do everything over again when you upgrade. The code should be added to the functions.php file of a BP child-theme.

    To learn how to make your own child-theme, see the codex here: https://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/

    @mercime

    Participant

    Thank you @pcwriter, I missed the line about changing core file instead of adding it in functions.php :-) I think I need to get reading glasses.

    @jugularbean

    Participant

    Hi, just found this post and tried adding the line of code to my functions.php but it doesn’t get rid of the view dropdown.

    I added the line of code
    `remove_action( ’bp_adminbar_menus’, ’bp_adminbar_random_menu’, 100 );`

    to the file /wp-content/themes/[theme name]/functions.php

    Is this correct?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Remove the ”visit” link from the buddypress admin bar…’ is closed to new replies.
Skip to toolbar