March 20, 2023
PHP Glossary
  • PHP Tutorial
  • WordPress
  • CodeIgniter
  • Javascript
PHP-operators-types

PHP Operators and their usage with example code

superglobal-variable-in-php

What are PHP super global variables and their usage in PHP

php-data-types

What are the PHP datatypes and their usage in php?

PHP syntax and write a hello world program

Lets know about PHP syntax and write a hello world program

Learn PHP in one week

Lets learn PHP and create own dynamic web application

How to open a popup window?

PHP Glossary
  • PHP Tutorial
  • WordPress
  • CodeIgniter
  • Javascript
PHP Glossary
  • PHP Tutorial
  • WordPress
  • CodeIgniter
  • Javascript
Wordpress

How to change wordpress logo, link & title of wordpress login page

November 10, 2018
280 Views
2 Min Read
change default logo,link & title
Dinesh Sharma
Add Comment
    Share This!
  • Facebook
  • Twitter
  • Google Plus
  • Pinterest
  • LinkedIn

In this post, we will show you:

(1) How to replace the WordPress logo with your website logo on the login page.
(2) How to replace WordPress URL with your website URL on the login page.
(3) And how to replace URL title with your custom title on the login page.

Change default logo, link & title of wordpress login page

(1) Replace WordPress logo with your website logo on the login page.

To Change the default logo of WordPress and add your website logo create a function

/*  Change the logo    */
 function phpglossary_addlogo() {
	 echo '<style type="text/css">
h1 a {background-image: url( here will be url of your website logo ) !important; }
</style>';
}

now add created function ‘phpglossary_addlogo’ to a filter hook :

add_action('login_head', 'phpglossary_addlogo');

now just copy & paste above code in your theme’s functions.php file.

(2) Replace WordPress URL with your website URL on the login page.

To Change the default link of WordPress and add your website link create a function

function phpglossary_logo_url()
{
return home_url();
}

and add created function ‘phpglossary_logo_url’ to a filter hook :

add_action('login_headerurl', 'phpglossary_logo_url');

and paste above code in the functions.php file of your WordPress theme.

(3) Replace URL title with your custom title on the login page.

To Change the default title of WordPress and add your title create a custom function

function phpglossary_login_title() {
return 'Here will be your title';
}

and add declared function ‘phpglossary_login_title’ to a filter hook :

add_filter('login_headertitle', 'phpglossary_login_title');

The complete code is given below :

<?php /*  Calling default  head url and head title filter */
 add_filter( 'login_headerurl', 'phpglossary_logo_url' );
 add_filter('login_headertitle', 'phpglossary_login_title');
 add_action('login_head', 'phpglossary_addlogo');
 
 /*  Change the logo    */
 function phpglossary_addlogo() {
	 echo '<style type="text/css">
h1 a {background-image: url( here will be url of your website logo ) !important; }
</style>';
}

/*  Change the logo url   */
function phpglossary_logo_url()
{
return home_url();
}

/*  Change the logo hover title   */
function phpglossary_login_title() {
return 'Powered By www.dineshsharma.in';
} ?>

To change the default WordPress logo, link and title on mouse hover on login page just copy and paste above code in your WordPress themes’s functions.php file, refresh your wordpress login page and see the changes.

Tagschange wordpress logo remove wordpress link wordpress

About the author

View All Posts

Dinesh Sharma

I have worked on many CMS & Frameworks of PHP & I love to share my knowledge of what I am learning every day.

Add Comment

Click here to post a comment

Cancel reply

How to add paytm payment gateway in wordpress website.
Comment
    Share This!
  • Facebook
  • Twitter
  • Google Plus
  • Pinterest
  • LinkedIn

 Subscribe in a reader

Recent Posts

  • PHP Operators and their usage with example code
  • What are PHP super global variables and their usage in PHP
  • What are the PHP datatypes and their usage in php?
  • Lets know about PHP syntax and write a hello world program
  • Lets learn PHP and create own dynamic web application

Categories

  • CodeIgniter1
  • functions5
  • Javascript1
  • PHP Tutorial5
  • Wordpress2

Archives

  • July 2020 (1)
  • May 2020 (6)
  • December 2018 (1)
  • November 2018 (1)
  • February 2018 (1)
  • October 2017 (4)

Tags

$GLOBALS $_COOKIE $_FILES $_GET $_POST $_REQUEST $_SERVER $_SESSION Arithmetic Operators array array_filter() ARRAY_FILTER_USE_BOTH ARRAY_FILTER_USE_KEY array_push boolean Bootstrap cal_days_in_month() case sensitive change wordpress logo Create own website CSS date() float Hello World program HTML integer Learn PHP MYSQL NULL Number of days in a month objects Open source language Paytm paytm payment Paytm Payment Gateway php array push PHP data type PHP Global Variables PHP Operators PHP syntax resources semi-colon string usort wordpress
Copyright © 2023. Powered By Dinesh Sharma