The admin bar is using the home_url() function which you can modify the result by using the “home_url” filter, this will change a lot of links on your admin area so looks like it’s not the best solution, anyway remember to use the is_admin() conditional tag or you will affect everything on the front end too.
https://github.com/WordPress/WordPress/blob/master/wp-includes/admin-bar.php#L357
The second option is to set the href directly:
$node->href="https://www.google.com";
Related Posts:
- How do I get the current edit page ID in the admin?
- Modify Admin Bar Link
- How to remove row-actions from pages table?
- Is it possible to remove the main rich Text box editor?
- Add admin bar link to edit author
- Replacing select2 in admin backend for all selects
- echo or print_r in an admin function
- Can I remove the Rich Text box editor for a specific post?
- How to add a column to the Trash page?
- How to test for Super Admin
- How to select a page within admin?
- How to Display Frontend CSS for Administrator only
- Hard-coding custom menu elements for menu manager
- How to make custom column Admin>Users sortable?
- Trigger a custom function when option are saved in admin area
- Move ‘current-menu-item’ class on #adminmenu li from Posts to Pages for Taxonomy Edit Screen
- Force to use STRONG users password and implement rule to prevent REUSE [closed]
- Logout Redirect and also WP-login.php Redirect
- what is best way to keep track of changes made in wordpress website? [closed]
- WordPress wraps span tags into p tags
- Creating a custom wordpress widget and stopping js from running twice(once in active widget once in widget selector)?
- Removing WPML Items From the WordPress Admin Bar
- Show metadata in users.php – wordpress
- How to display my comment count in the wordpress admin bar?
- Multisite Admin Roles
- function to return comma separated list of meta values
- Screen Options WordPress WYSIWYG
- plugins_url vs plugin_dir_url
- Get list of years when posts have been published
- Where and how to put inline js in pages
- Is it possible to remove the “standard” post format?
- Do WordPress’ cron’s clean up expired transients?
- How to add first name & last name to default registration form?
- Warning/Notice about functions.php
- Is checking whether the blog is installed necessary?
- Overriding methods in a child theme
- WP disobeys disabling of the posts revision feature
- How do I deactivate a plugin for some roles
- How to display more audio file ID3 tags in WordPress
- Searching for content post
- Running CRON on Server with WP Function
- Using separate .php file for functions – how to run on site?
- Register vendor JS/CSS only on pages that require them?
- Adding HTML to the end of every post with the Block Editor
- Can I hide certain upload folders in media library [duplicate]
- Function issue with Walker_Nav_Menu [duplicate]
- wp_nav_menu, walker class, categories as classes of li
- Why is my page feed returning empty content?
- Add other social networks to TwentyNineteen_SVG_Icons class in child theme?
- Including a specific Javascript Script in a template. Is my code correct?
- Custom shortcodes not inserting into visual composer columns
- Adding a colorbutton in tinymce dialog with current api
- Post meta not updating
- append to existing parent theme function
- Get category URL for current post
- How can I get the post id from within functions.php
- Check if Page Slug Exists, then display that Page’s Title
- Why doesn’t is_page(id) work in functions.php?
- I have problems with loading javascripts
- Enqueuing latest version of jQuery into a child theme returns a blank screen
- How do I change a parent theme’s function through the child theme?
- Dropline menus — seperators between children only?
- Echoing function into WordPress NextGen gallery
- does wp function the_content(); accept another tag inside
- How to parse a shortcode within a shortcode?
- Prevent loading of functions
- WP Customizer API loaded into functions.php
- Get term slug by term id and then explode it
- Shortcode question
- call_user_func_array() expects parameter 1 to be a valid callback, function
- the_widget() inside functions.php
- define css class in functions.php
- Adding tables to the WordPress Editor
- Add Login and logout buttons to top menu bar
- implementing a centralized content “show-do-not-show” toggle?
- Load templates, pass arguments, and render output from functions.php
- How to load a css file depending on the current role
- WordPress Lite/Light
- How to add HTML into error message
- Add a word after the post url if it is within a specific category
- Is_Page doesnt detect my page
- Security when outputing wp_oembed_get code
- Problems adding a new field to product in cart
- Function for Sticky Post on Categories causes issues with 404 behavior
- Get value of pre-populated Gravity forms field as variable in my function
- Will dequeueing in child theme functions.php file prevent Google Fonts from loading?
- Edit meta fields from within template
- What to do to have access to WordPress functions
- Adding a meta box fields to child theme options page
- Changing the color of post title [closed]
- Create html from function
- Admin Panel errors because of functions.php
- WordPress not performing direct update
- Using Output from one Function and calling it into another
- How to add a class and title attribute to the link generated by next/previous post
- “Headers already sent” while trying to add a CSS file to my login page?
- Remove theme, change theme button and WP version on “Right Now” admin dashboard?
- Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’ in ….functions.php on line 73
- Customizer cuistom CSS Priority ordre Issue
- WPDB query suddenly not working