Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

How to change the link of the wordpress logo in the admin bar?

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.

Related Posts:

  1. WYSIWYG – Getting the “link” button from HTML mode in Visual mode
  2. How would I add a link to the profile editing page of the dashboard?
  3. Remove Admin sidebar link
  4. How to disable accessing the custom post types from frontend via a link?
  5. WordPress4.1.15 Dashboard links not working
  6. WordPress 4.5 Inline Link Toolbar not working on custom wp_editor instance
  7. What are the standard admin CSS id/class tags?
  8. Admin Ajax is returning 0
  9. Add custom column to Users admin panel
  10. wp_verify_nonce vs check_admin_referer
  11. Add a Separator to the Admin Menu?
  12. How to determine whether we are in add New page/post/CPT or in edit page/post/CPT in wordpress admin?
  13. how to know if admin is in edit page or post [duplicate]
  14. Modal window from within WordPress admin
  15. Where in WP can I check history or log of updates of plugins etc?
  16. Adding a custom admin page
  17. How does admin-ajax.php work?
  18. How to remove entire admin menu?
  19. How do I remove dashboard access from specific user roles?
  20. How can I speed up my WP admin section?
  21. How to pass parameters to admin_notices?
  22. Admin: very slow edit page caused by core meta query
  23. if admin is logged in
  24. Search posts by ID in admin
  25. How to Change the Default Home Page for the WordPress Dashboard?
  26. Setting admin edit panels & metaboxes positions and visibility for ALL users and admins
  27. Find out which moderator approved comment?
  28. The website cannot display the page
  29. How To Remove WordPress Version From The Admin Footer
  30. Sort pages in loop by admin’s page attributes order field?
  31. Edit “thank you for creating with WordPress” in version 3.3.1
  32. Hide other users’ posts in admin panel
  33. Set Default Admin Colour For All Users
  34. Editor Styles and Typekit
  35. WordPress admin stylesheet
  36. This CSS Stuffing Works, But Is This A Good Practice?
  37. Is it possible to create a WordPress tour? V3.3.1
  38. Securing Admin Accounts – Username Discovery
  39. is_admin() returns true when using admin-ajax.php from front end script
  40. How to save dismissable notice state in WP 4.2?
  41. How do I optimize a custom post type admin page with 25,000 posts?
  42. Settings API – adding setting fields dynamically?
  43. Disable Media Uploads to non Admin Users
  44. How do I load a CSS style into WordPress admin area only?
  45. Allowing admin-ajax.php to receive “application/json” instead of “x-www-form-urlencoded”
  46. Can an admin check passwords of registered users?
  47. How can I target WordPress 3.8 new interface MP6 with CSS?
  48. Notification that the admin is online
  49. Does wordpress create activity, update logs?
  50. sort child pages on admin
  51. How-to make the admin area mobile friendly [closed]
  52. How to remove list view from media library?
  53. How to disable the “Your site has updated to WordPress x.y.z” admin email?
  54. Load plugin scripts and styles only on plugin page
  55. Plugin to remove Admin menu items based on user role?
  56. How to obtain the user ID of the current profile being edited in WP-Admin?
  57. 3.3: How do you hide the new dashboard welcome panel?
  58. Add my own button next to “Screen options” and “Help” in the admin
  59. WP List Table custom quick edit box – post meta data missing and columns change on submit
  60. Settings API – easiest way of validating checkboxes?
  61. Are there any action like ‘init_frontend’
  62. Should I use is_admin() inside ‘admin_init’ hook callback
  63. Custom admin email for new user registration
  64. Send Admin Emails to Multiple Email Addresses
  65. How do I set up the defualt page icon for admin menu?
  66. Prevent author from changing their posts if admin has modified
  67. Cannot access admin panel
  68. Make A WordPress Page Accessible To Admins Only, Redirect Other User Roles
  69. Disable all https in WordPress
  70. localhost/wp-admin on my local redirects to production site’s /wp-admin
  71. How to remove administrator role in settings -> general -> New User Default Role?
  72. Is there a more efficient admin search function/plugin?
  73. Can a users profile be put under the dashboard menu
  74. WordPress Admins or Roles per Page
  75. Styling Shortcodes in Visual Editor
  76. initial sort order for a sortable custom column in admin
  77. Showing WP_Error message with admin_notice action hook
  78. WordPress admin screen very slow / timing out when editing or adding a new page/custom post
  79. Uploading files in admin panel?
  80. turn off new user registration emails
  81. Redirect Admin User in Dashboard
  82. Send automatic mail to Admin when user/member changes/adds profile
  83. Create un-removeable user
  84. Get current active wp color scheme
  85. Read only capability for custom post in admin area
  86. WordPress Admin back-end – advanced options page?
  87. Cannot login to WordPress Admin with SSL terminated load balancer
  88. How can ‘admin_email’ be set?
  89. Set Featured Image programmatically (in admin) with JavaScript?
  90. Disable the post save process completely
  91. use add_settings_field properly?
  92. How to change WordPress default strings?
  93. How can we customize the logo and some text on the welcome screen?
  94. front end logo upload like happytables
  95. Can I set a default dashboard layout for all users?
  96. Allow admin login at /admin
  97. Is there a hook to put stylesheet and/or JS inside iframes (thickbox or tinyMCE) in admin area
  98. How to add filter in “Comments” at the admin panel?
  99. Thickbox hacking – removing fields
  100. How to show custom menu items in the WordPress android app?
Categories admin Tags admin, links, logo
Change the format in the paginage_links
How can I alter this code to accept a slug as well as an ID?

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress