Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do i remove the link to wordpress.org in my buddyPress notification bar?


  • pattz2016
    Participant

    @pattz2016

    i want to be the only one able to view the link as the admin. When users are viewing their notifications in the right side, there are links to WordPress.org on the left side. I don’t think this part is relevant to my users based on the forums they are discussing.

    Any advise Please?

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

  • @mcuk
    Participant

    @mcuk

    If you mean the WP bar at the top of the screen, then this might help. Add to functions.php

    function remove_wp_logo( $wp_admin_bar ) {
    	if ( !current_user_can( 'administrator' ) && !is_super_admin() ) {
    		$wp_admin_bar->remove_node( 'wp-logo' );
    	}
    }
    add_action( 'admin_bar_menu', 'remove_wp_logo', 999 );

    This will remove the WordPress Logo (and therefore the dropdown menu that appears with the link to WordPress.org). If you just want to remove the WordPress.org link in that menu then replace 'wp-logo' with 'wporg' in the function above.


    pattz2016
    Participant

    @pattz2016

    thanks for your response, I do not want to remove WP adim bar, because that is where the notifications appear. I only want to remove the wp-logo. the drop down wordpress menu at the side of the top bar.

    Not the bar itself


    pattz2016
    Participant

    @pattz2016

    Where exactly do i insert the code in buddypress/bp-forums/bp-forums-functions.php

    Below which comment?

    Many thanks.


    @mcuk
    Participant

    @mcuk

    The code doesn’t remove the bar, it just removes the WordPress logo in the top left.

    The code is put in your functions.php file. It is a file you create (if you haven’t already done so) and put in your child theme folder.

    https://codex.wordpress.org/Child_Themes


    pattz2016
    Participant

    @pattz2016

    hi,
    I have created a child theme , named it Frontier-child and pasted the code as below. But still the WP LOGO is there.

    <?php
    //
    // Recommended way to include parent theme styles.
    // (Please see https://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
    //
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘child-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array(‘parent-style’)
    );
    }
    //
    // Your code goes below
    //

    function remove_wp_logo( $wp_admin_bar ) {
    if ( !current_user_can( ‘administrator’ ) && !is_super_admin() ) {
    $wp_admin_bar->remove_node( ‘wp-logo’ );
    }
    }
    add_action( ‘admin_bar_menu’, ‘remove_wp_logo’, 999 );


    pattz2016
    Participant

    @pattz2016

    Please ignore the above message. I realize now that i the logo is there because i am logged in as the admin. Others users cannot access it.

    Many thanks.

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