• About WordPress
    • About WordPress
    • WordPress.org
    • Documentation
    • Support
    • Feedback
  • Log In
  • Register
WordPress.org
WordPress.org
  • Plugins
  • Themes
  • Patterns
  • Learn
  • Support
    • Documentation
    • Forums
  • News
  • About
  • Get Involved
    • Five for the Future
  • Showcase
  • Mobile
  • Hosting
  • Openverse
  • Get WordPress
Get WordPress

Code Reference

Skip to content
Filter by type:
Search
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 on Trac


Top ↑

Related

Top ↑

Used By

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

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 — 3 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
  • Support
  • 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
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.