Add text and hyperlink to login page

I’m currently using the White Label plugin to add my logo to the login page. But I’d also like to add some text with a hyperlink somewhere on the page (ideally between the logo and login box).
Is this possible?
thx!

Hi @yanikphoto,

Thanks for reaching out.

I would like to know what login page you are referring to, it is the wp-admin log in page? providing screenshots is a great help.

Thank you.


yes from the wp-admin login page.
https://muscleanatomymasterclass.com/wp-admin/

Hi @yanikphoto,

You can add the specific custom text to the login page by calling the login_message filter hook. I would suggest you add the following sample code into your child theme functions.php file.

function custom_login_message()
{
    $message = "Your custom message goes here";
    return $message;
}
add_filter('login_message', 'custom_login_message');

Remember that the above code will work if copied as it is and don’t conflict with any existing code.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We do not provide support for custom codes that means we can’t fix it in case it conflicts with something in your site nor will we enhance it.
And if you are not proficient with the coding, I would suggest you hire a developer who can assist you to do the customization.

Thanks

How would I add a hyperlink text? Something like CLICK HERE.

Hello @yanikphoto

To add the hyperlink text you just need to replace “Your custom message goes here” with your HTML code
Please find sample code here

function custom_login_message()
{
    $message = "<a href="https://muscleanatomymasterclass.com/wp-admin/">CLICK HERE</a>";
    return $message;
}
add_filter('login_message', 'custom_login_message');

Still, I would suggest you hire a developer who can assist you to do the customization.

Thanks

That broke the site with a 500 error so I’ll ask my programmer.

Thx!

Hello @yanikphoto,

Sorry, It was my mistake. Please update the previous code with this code.

function custom_login_message()
{
    $message = "<a href='https://muscleanatomymasterclass.com/wp-admin/'>CLICK HERE</a>";
    return $message;
}
add_filter('login_message', 'custom_login_message');

Hope it helps you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.