Quantcast
Channel: Extreme Web Designs » wordpress-snippets
Viewing all articles
Browse latest Browse all 10

Remove WordPress.org link From Register/Login Pages

$
0
0

Rocky Dev

If you have noticed, by default the links/logo point to wordpress site in Register/Login pages or in some of the default WordPress themes. Did you ever wonder how can remove WordPress.org link? If yes, then the following snippet of code can help you.

How to Remove WordPress.org link from Register/Login page

Just add the follow inside of your theme’s functions.php file. If you don’t have this functions.php file, then manually create one.

<?php //This code goes in functions.php file of your theme
function customize_url( $url )
{
//This changes link to the current site url.
return get_bloginfo( 'url' );
}
add_filter( 'login_headerurl', 'customize_url' );
?>

In you want to change the link to point to a custom url, then you may use the following code:

<?php //This code goes in functions.php file of your theme
function customize_url( $url )
{
//Change the value within the single quotes below to your desired domain name
return 'http://www.mydomain.com';
}
add_filter( 'login_headerurl', 'customize_url' );
?>

Note: “login_headerurl” can be called as a filter that is used to filter the url.

Your Turn!

Do you know of any other ways to remove WordPress.org link from Register/Login page? If yes, please share it with us in your comment below.

Remove WordPress.org link From Register/Login Pages


Viewing all articles
Browse latest Browse all 10

Trending Articles