Rewrite the HTML markup of wp-login.php (4 posts)

  1. guyweb
    Posted 6 years ago #

    I've been looking for a plugin but have not yet discovered anything suitable.

    I'd like to change the HTML markup found in the wp-login.php file so that it fits with the design conventions of my site.

    I have experimented with the theme my admin plugin but this does not work with another vitally important plugin to the site: members only.

    The site uses the 'members only' so content is only available to registered users.

    What I would like to do is find or create a plugin that will enable me to continue to use the wp-login.php form but remove existing html and replace it with new HTML.

    For example,

    <body class="login"> becomes <body class="wide">


    <h1><a href="<?php echo apply_filters('login_headerurl', 'http://wordpress.org/'); ?>" title="<?php echo apply_filters('login_headertitle', __('Powered by WordPress')); ?>"><?php bloginfo('name'); ?></a></h1>


    <div id="site-ident">
    <p id="site-title"><?php bloginfo('name'); ?></p>
    <p id="site-description"><?php bloginfo('description'); ?></p>

    In the first instance I'd like to know if this is even possible? Any pointers? For the time being I'm am simply changing the core code of the wp-login.php which means I have to reapply the changes with each update to WordPress. I'd love to find a more elegant way of doing this.

    Many thanks.

  2. dtiger2k
    Posted 6 years ago #

    I haven't checked any of them out but go to this site (wordpress.org) / extend / plugins directory and search for custom login. There are plenty to choose from that you can check out.

  3. guyweb
    Posted 6 years ago #

    Thanks ditiger2k. Yeh none of them work as they only add style sheet links to the <head> portion of the page. There are hooks in the API to do that easy enough:

    `add_action('login_head', 'bm_custom_login');
    add_filter('login_headerurl', 'change_wp_login_url');
    add_filter('login_headertitle', 'change_wp_login_title');'

    but apparently nothing to change HTML beyond that. Hmmm..

  4. david.stolarsky
    Posted 6 years ago #

    hey guyweb, did you figure this out? I want to modify the login page so my users know to use their Windows Domain credentials via an AD Auth. integration... obviously you could just edit the PHP file but then upgrades will kill it...

Topic Closed

This topic has been closed to new replies.

About this Topic