Site logo

Archived topic

Replace login logo

7 replies · Started by Chad Biggs on December 7, 2015

Viewing posts 1–8 of 8

Hi Tom,  do you have a gp hook to change the login logo and logo link?  Which directory should I put my replacement logo file in to work with your hook?

I use this function on this site:

function generate_login_logo() { ?>
    <style type="text/css">
        .login h1 a {
            background-image: url('URL TO YOUR LOGIN LOGO');
        }
    </style>
<?php }
add_action( 'login_enqueue_scripts', 'generate_login_logo' );

Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

To change the link etc. you may need to find a plugin.

I can modify the login page. I was just trying to find a solution to keep from doing a child theme.

Use the Code Snippets plugin and you won't need to use a child theme :)

Thank you.

You're welcome :)

Hi Tom,
The code you supplied was added to the functions.php and it worked the treat.
Thanks.

With a brief search on wordpress.org, I found the additional code required to change the hover title and the link.
It also works perfectly.

    // changing the login page URL
    function put_my_url(){
    return ('HTTP://WWW.YOUR-DOMAIN.COM/'); // putting my URL in place of the WordPress one
    }
    add_filter('login_headerurl', 'put_my_url');

    // changing the login page URL hover text
    function put_my_title(){
    return ('NAME OF YOUR WEBSITE'); // changing the title from "Powered by WordPress" to whatever you wish
    }
    add_filter('login_headertitle', 'put_my_title');

Mo

Cool, thanks for sharing! :)

This archived topic is closed to new replies.