Try this.
Even if you want to change “View Site” link then remove “site-name” and add “view-site” in get_node.
Thanks.
add_action( 'admin_bar_menu', 'customize_my_wp_admin_bar', 80 );
function customize_my_wp_admin_bar( $wp_admin_bar ) {
$site_node = $wp_admin_bar->get_node('site-name');
//Change link
$site_node->href = home_url().'/velkommen';
//Update Node.
$wp_admin_bar->add_node($site_node);
}
Related Posts:
- A similar hook as wp_head for the admin area
- Admin pages have no content
- disable admin-bar search field for specific roles
- What determines whether admin toolbar is shown to a logged-in user?
- Restore original WP admin bar after BuddyPress install [closed]
- Disable the “Skip to Toolbar” tabbing accessibility feature
- Hide admin toolbar based on a query string
- Admin Top Bar Not Showing On Front End
- Admin bar is disabled in front
- require/include php file in add_menu()
- Admin Bar Acting Up
- Show admin bar to editors with Buddypres
- Can’t access dashboard after 4.8.1 automatic upgrade
- Signed-in as admin on just part of the site
- Add item to admin bar as late as possible
- Custom Div with links on Admin Bar
- Content is displayed under admin bar [closed]
- What are the standard admin CSS id/class tags?
- how to know if admin is in edit page or post [duplicate]
- How to remove entire admin menu?
- How can I target WordPress 3.8 new interface MP6 with CSS?
- Settings API – easiest way of validating checkboxes?
- Modify Admin Bar Link
- Redirect Admin User in Dashboard
- Read only capability for custom post in admin area
- How can ‘admin_email’ be set?
- How to change WordPress default strings?
- Remove ability to access certain admin menus
- Gutenberg “Add Block” button is not active (greyed out), cannot add new blocks
- How To View Site from Non-Logged-In User’s Perspective
- Conditional check for front-end which includes ajax
- Hide update messages from non-admin users?
- Daily notices of failed login attempts for non-existent admin user
- Reorder plugin items in the admin menu
- Wrong url in sortable column headers & pagination in the admin, when behind a proxy
- Reference external file as a function
- “Automatically add new top-level pages” Default
- Is it possible to hook AJAX to UPDATE-button?
- Check if user is logged in else login page
- Which hook for processing plugin page form data?
- Calling a shortcode in the backend
- Add tabbed menu to admin page
- WYSIWYG – Getting the “link” button from HTML mode in Visual mode
- Error thrown. Cannot create references to/from string offsets
- Include admins in author drop-down on edit post screen
- How can I restore admin capabilities?
- How to restrict wp-admin and prevent upload errors
- Adding another “Add Post” button to admin
- Assuming a theme is properly secured, how save is the WordPress admin?
- Is there a way to hook into the update-core page for custom messages?
- How to solve 500 Error on WordPress Admin Dashboard due to time-out on getdirsize
- Enabling users to replace site title (text) with a image logo (but keeping the text if there isn’t any image)?
- WordPress How to begin editing from admin page (please see picture)
- WordPress as a web app – always auto-save post and meta data
- Determining whether it’s a AJAX call from front-end or from back-end
- Custom Thickbox Broken on Dashboard Page?
- Categorizing Page Templates
- Super slow admin panel
- My WordPress Admin looks messed up when I edit posts or pages
- Save author posts as in pending review – block users updating their posts
- Force Contributors to add Tags via edit-tags.php
- Edit Auto Update Admin Notification
- Unable to Access WP Admin or Login buttons after Migration
- Add custom button next to native “Apply” button in the edit-tag screen
- Enqueue and Dequeue from admin bar nodes
- How to enqueue admin content outside admincp
- How do I correctly transfer my site from one domain to another?
- Unable to get to the admin panel
- Where can I store common cross-site text (e.g. headings, titles etc.)
- get_current_screen and the WP_Screen class
- How to find a spam link?
- How to change all “Post” texts in dahboard into “Article”?
- How to modify admin headers
- Directly editing content on webpage, is it possible?
- How to disable Media Library uploads for non-Admin users?
- Admin user lacks admin permissions after hack and can’t reinstate
- Redirect public site to another one but allow administrators to access the old site
- “sufficient permissions” error for admin after duplicating WP database to new install
- How to remove the default checked attribute from inputs in admin?
- Passing state from child component to parent component in a Gutenberg Sidebar
- I can’t enter the control panel of my wordpress site after channing the URL to https://
- Shop in Subdomain feeding main domain order in admin area
- Error 404 Display on otherlinks apart from homepage
- Admin Access for specific page(s)
- Sortable admin columns by 0.00 number
- WordPress Admin Thickbox: Remove Margins/Padding
- How to change the title attribute for the WP logo image on wp-login.php
- WordPress Admin Email
- WordPress “Hide WP” Gives Me Error After Admin Login [closed]
- Editing post in admin panel
- Making a custom upload form and page in the admin section
- site admin for subscribers
- Customise the add media pop-up to include rel attribute option
- WordPress admin loads erratically “connection reset by peer”
- Remove “minor-publishing” div from Publish admin metabox
- How to fix broken admin Thickbox?
- Can’t access my wp admin: captcha images invisible, gives me error message
- Pull Random Images From Options Page [closed]
- You do not have permission to access this document on form submit
- CSS Styles specific to Admin Sidebar not loading