0

I have found solutions to change the logo itself and to remove that "about.php" link in the dropdown, but this does not affect the "about.php" link in the wordpress logo.

How can I change this?

1
  • 1
    Edit and add the code you are mentioning in your question Commented Apr 26, 2014 at 7:28

1 Answer 1

1

You should add the following to your functions.php, you can add, edit or delete items to your desire.

remove_action( 'admin_bar_menu', 'wp_admin_bar_wp_menu', 10 );
add_action( 'admin_bar_menu', 'my_admin_bar_wp_menu', 10 );

    function my_admin_bar_wp_menu( $wp_admin_bar ) {
    $wp_admin_bar->add_menu( array(
        'id'    => 'wp-logo',
        'title' => '<span class="ab-icon"></span>',
        'href'  => 'http://yourdomain.com',
        'meta'  => array(
            'title' => __('About my website'),
        ),
    ) );

    if ( is_user_logged_in() ) {
        // Add "About WordPress" link
        $wp_admin_bar->add_menu( array(
            'parent' => 'wp-logo',
            'id'     => 'about',
            'title'  => __('About WordPress'),
            'href'  => self_admin_url( 'about.php' ),
        ) );
    }

    // Add WordPress.org link
    $wp_admin_bar->add_menu( array(
        'parent'    => 'wp-logo-external',
        'id'        => 'wporg',
        'title'     => __('WordPress.org'),
        'href'      => __('http://wordpress.org/'),
    ) );

    // Add codex link
    $wp_admin_bar->add_menu( array(
        'parent'    => 'wp-logo-external',
        'id'        => 'documentation',
        'title'     => __('Documentation'),
        'href'      => __('http://codex.wordpress.org/'),
    ) );

    // Add forums link
    $wp_admin_bar->add_menu( array(
        'parent'    => 'wp-logo-external',
        'id'        => 'support-forums',
        'title'     => __('Support Forums'),
        'href'      => __('http://wordpress.org/support/'),
    ) );

    // Add feedback link
    $wp_admin_bar->add_menu( array(
        'parent'    => 'wp-logo-external',
        'id'        => 'feedback',
        'title'     => __('Feedback'),
        'href'      => __('http://wordpress.org/support/forum/requests-and-feedback'),
    ) );
}

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.