Hi,
I have changed the dashboard logo through this plugin.
https://wordpress.org/plugins/ag-custom-admin/
try it.
Thread Starter
Bloke
(@bloke)
Thanks trying to avoid installing a plugin. I know functions are similar. Seems strange the last 5 tutorials show the same way to change it buy mine won’t work.
Hi,
I did it,
function no_wp_logo_admin_bar_remove() {
?>
<style type="text/css">
#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
content: url(<?php echo get_stylesheet_directory_uri(); ?>/images/rss-2x.png) !important;
top: 2px;
}
#wpadminbar #wp-admin-bar-wp-logo > a.ab-item {
pointer-events: none;
cursor: default;
}
</style>
<?php
}
add_action('wp_before_admin_bar_render', 'no_wp_logo_admin_bar_remove', 0);
add this code to your theme functions.php and add the link for the icon from the images folder from your theme.
Thread Starter
Bloke
(@bloke)
Thanks that worked. I guess they changed the CSS and the other approach was not working.
glad that it worked :), will you please mark you issue as resolve.
Thank you for this! To change the associated link URL and hover title text, you can add the following:
// changing the login page URL
function put_my_url(){
return ('http://www.yourdomain.com/'); // putting my URL in place of the WordPress one
}
add_filter('login_headerurl', 'put_my_url');
// changing the login page URL hover text
function put_my_title(){
return ('Name of Your Website'); // changing the title from "Powered by WordPress" to whatever you wish
}
add_filter('login_headertitle', 'put_my_title');
Found the latter in this convo from a few years ago, but as of WP 4.3.1 it still works:
https://wordpress.org/support/topic/functionsphp-change-logo-and-link-login-page