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

Developer Resources

Browse: Home / Reference / Hooks / login_enqueue_scripts

do_action( 'login_enqueue_scripts' )

Enqueues scripts and styles for the login page.

Contents

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

More Information

login_enqueue_scripts is the proper hook to use when enqueuing items that are meant to appear on the login page. Despite the name, it is used for enqueuing both scripts and styles, on all login and registration related screens.


Top ↑

Source

File: wp-login.php. View all references

do_action( 'login_enqueue_scripts' );

View on Trac View on GitHub


Top ↑

Related

Top ↑

Used By

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

Outputs the login page header.


Top ↑

Changelog

Changelog
Version Description
3.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: 1You must log in to vote on the helpfulness of this note
    Contributed by Collins Mbaka — 3 years ago
    function themeslug_enqueue_style() {
    	wp_enqueue_style( 'core', 'style.css', false ); 
    }
    
    function themeslug_enqueue_script() {
    	wp_enqueue_script( 'my-js', 'filename.js', false );
    }
    
    add_action( 'login_enqueue_scripts', 'themeslug_enqueue_style', 10 );
    add_action( 'login_enqueue_scripts', 'themeslug_enqueue_script', 1 );
    Log in to add feedback
  2. Skip to note 2 content
    You must log in to vote on the helpfulness of this noteVote results for this note: 0You must log in to vote on the helpfulness of this note
    Contributed by Akira Tachibana — 3 years ago

    From Codex

    function themeslug_enqueue_style() {
    	wp_enqueue_style( 'core', 'style.css', false ); 
    }
    
    function themeslug_enqueue_script() {
    	wp_enqueue_script( 'my-js', 'filename.js', false );
    }
    
    add_action( 'login_enqueue_scripts', 'themeslug_enqueue_style', 10 );
    add_action( 'login_enqueue_scripts', 'themeslug_enqueue_script', 1 );
    Log in to add feedback

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

  • About
  • News
  • Hosting
  • Privacy
  • Showcase
  • Themes
  • Plugins
  • Patterns
  • Learn
  • Documentation
  • Developers
  • WordPress.tv ↗
  • Get Involved
  • Donate ↗
  • Swag Store ↗
  • WordCamp ↗
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org
  • Visit our Facebook page
  • Visit our X (formerly Twitter) account
  • Visit our Instagram account
  • Visit our LinkedIn account
  • Visit our YouTube channel
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.