• Resolved tationline

    (@tationline)


    Hello,

    how can I add static text to the loginform?
    I want to show a small welcome text below the image logo-login.gif, but all I tried didn’t work (I am a WordPress newbie …).

    I couldn’t find any information so far (the only way I found was to edit the graphic file …).

    Thanks in advance for help ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter tationline

    (@tationline)

    Hi Michael,

    thanks for your response. I already did Google and WP-Plugin-searches, but all results I found will modify/replace the graphics file only and/or changing the text-layout via CSS.
    All I want to do is to add one line of text (something like “Welcome to my blog, you need to be registered to see content”) above or below the login box.

    I was hoping, that this would only be one line of code, that needs to be added “somewhere” to wp-login.php. Or is this something that would need far more code changes?

    I do not want to create a new graphic file, because this would take much more time … if it should look nice.

    Hate making changes to core code, but in wp-login.php you could change:

    if ( !empty( $message ) ) echo apply_filters('login_message', $message) . "\n";

    to

    $message = "Welcome to my blog, you need to be registered to see content";
    if ( !empty( $message ) ) echo apply_filters('login_message', $message) . "\n";

    Note: in 2.8 (once it is released) looks like the login_message is made more pluggable so you could add this to your theme’s function.php file so you don’t need to modify core code:

    function custom_login_message() {
    $message = "Welcome to my blog, you need to be registered to see content";
    return $message;
    }
    add_filter('login_message', 'custom_login_message');
    Thread Starter tationline

    (@tationline)

    Hi Michael,

    thanks again for your quick response!
    This is exactly what I was looking for!!!

    I don’t like to modify core files either, but in this case it is just one line (which I can easily remember) and is definitely faster to implement than creating graphic files.

    Thanks again for your help.

    This message would be shown on both login and registration sceen, but how to show it only on login screen? I didn’t find some conditional tags for it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to add static text to login form / wp-login.php’ is closed to new replies.