This is how I change the url for the WP logo on the wp-login.php page:

function my_login_url() {
    $url = esc_url( home_url() );
    return ( $url ); 
add_filter('login_headerurl', 'my_login_url');

But the title for the a tag remains the same.

How to change the a tag too?

I mean right now I have this:

<a href="http://localhost/demo" title="We are using WordPress" tabindex="-1">DEMO</a>

And I want:

<a href="http://localhost/demo" title="My custom text" tabindex="-1">DEMO</a>
function my_login_logo_url() {
  return home_url();
add_filter( 'login_headerurl', 'my_login_logo_url' );

function my_login_logo_url_title() {
  return 'Your Site Name and Info';
add_filter( 'login_headertitle', 'my_login_logo_url_title' );

For details follow link

  • Wow, thanks. It works. Any idea how can we combine them into one function? Oct 17 '15 at 9:19
  • 1
    @JohnDoerthy These are two separate tasks. Separation of concerns requires two different functions.
    – fuxia
    Oct 17 '15 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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