Skip to content
  • Log In
  • Register
WordPress.org
  • News
  • Download & Extend
    • Get WordPress
    • Themes
    • Patterns
    • Plugins
    • Openverse
    • Mobile
    • Hosting
  • Learn
    • Learn WordPress
    • Documentation
    • Forums
    • WordPress.tv
    • Developers
  • Community
    • Make WordPress
    • WordCamp
    • Meetups
    • Photo Directory
    • Job Board
    • Five for the Future
  • About
    • About WordPress
    • Showcase
    • Gutenberg
    • Enterprise
    • WordPress Swag Store
  • Get WordPress
Get WordPress

Developer Resources

Browse: Home / Reference / Hooks / login_headerurl

apply_filters( 'login_headerurl', string $login_header_url )

Filters link URL of the header logo above login form.

Contents

  • Parameters
  • More Information
  • Source
  • Related
    • Used By
  • Changelog
  • User Contributed Notes

Parameters

$login_header_url string
Login header logo URL.

Top ↑

More Information

TheĀ “login_headerurl” filter is used to filter the URL of the logo on the WordPress login page. By default, this logo links to the WordPress site.

A plugin can register as a content filter with the code:

add_filter("login_headerurl","plugin_function_name");

Where “plugin_function_name” is the function WordPress should call when the content is being retrieved. Note that the filter function the plugin definesĀ must return the URL after it is finished processing, or the logo may not have any links, and other plugins also filtering the same may generate errors.

You can also use this in the theme function.php file within your WordPress page if you don’t wish to use a plugin or want to distribute your theme.


Top ↑

Source

File: wp-login.php. View all references

$login_header_url = apply_filters( 'login_headerurl', $login_header_url );

View on Trac View on GitHub


Top ↑

Related

Top ↑

Used By

Used By
Used By Description
login_header() wp-login.php

Output the login page header.


Top ↑

Changelog

Changelog
Version Description
2.1.0 Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content
    You must log in to vote on the helpfulness of this noteVote results for this note: 3You must log in to vote on the helpfulness of this note
    Contributed by Jose Lazo — 4 years ago

    In the below example the logo’s default link is changed to the site url.

    /**
     * Custom login image URL
     */
    function my_custom_login_url( $url ) {
    	return get_bloginfo( 'url' );
    }
    add_filter( 'login_headerurl', 'my_custom_login_url', 10, 1 );
    Log in to add feedback

You must log in before being able to contribute a note or feedback.

  • About
  • News
  • Hosting
  • Donate
  • Swag
  • Documentation
  • Developers
  • Get Involved
  • Learn
  • Showcase
  • Plugins
  • Themes
  • Patterns
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • Privacy
  • Public Code
WordPress.org
WordPress.org
  • Visit our Facebook page
  • Visit our Twitter account
  • Visit our Instagram account
  • Visit our LinkedIn account
Code is Poetry

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.