• Resolved Abhay Kulkarni

    (@hiabhaykulkarni)


    Hi,

    I am trying to change my website’s Login Form Logo using the article available of Codex https://codex.www.ads-software.com/Customizing_the_Login_Form. I have changed that successfully but have problem with the following function:

    function my_login_logo_url() {
    return home_url();
    }
    add_filter( ‘login_headerurl’, ‘my_login_logo_url’ );

    In this function, I want to replace the home_url with a URL of different website URL. Is this possible? If yes how can I?

    Thanks in Advance!
    Abhay

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    It is generally assumed that the logo in the header is a link to the home page of the current site. If you change that, you may frustrate users.

    That said, try

    function my_login_logo_url() {
    return 'https://example.com';
    }
    Thread Starter Abhay Kulkarni

    (@hiabhaykulkarni)

    Hi @sterndata,

    Thanks for replying. I tried the same but it didn’t work. Instead of that, it added www.ads-software.com

    Regards,
    Abhay

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    This works for me:

    add_filter( 'login_headerurl', 'my_login_logo_url' );
    function my_login_logo_url( $url ) {
    return 'https://example.com';
    } 
    

    The code you’re using is using the wrong delimiters for a string. Don’t copy/paste, but retype to m ake sure you’re using the apostorphe/prime character.

    Thread Starter Abhay Kulkarni

    (@hiabhaykulkarni)

    Hi,

    Thank you very much for your fast reply. It Worked for me ??

    Thanks & Regards,
    Abhay

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Changing WordPress Login Page using Codex’ is closed to new replies.