1

I'm trying to add message on the login forms. How do I change the contents according to the page title or url parameters

this code goes to my functions.php

function custom_login_message() {
  $message = "<h2>". PAGE TITLE HERE ."</h2>";
  return $message;
}
add_filter('login_message', 'custom_login_message');

I want it to change for the pages login, register and lost password.

0

If you want to customize the login page, then the best place to start is looking here on the Codex: https://codex.wordpress.org/Customizing_the_Login_Form

(The codex is the best place to start for a lot of things...)

You will find lots of info and examples on how to customize various parts of the login form and text.

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.