Skip to content

Instantly share code, notes, and snippets.

@coenjacobs
Created January 25, 2012 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coenjacobs/1675750 to your computer and use it in GitHub Desktop.
Save coenjacobs/1675750 to your computer and use it in GitHub Desktop.
Adding a link to wp-login.php via jQuery
jQuery( document ).ready(function( $ ) {
var href = $("#nav a").attr("href");
var html = '<a href="'+ href +'">First login?</a> - ';
$( "#nav" ).prepend( html );
} );
function custom_login() {
echo '<script type="text/javascript" src="'.get_bloginfo( 'url' ).'/wp-includes/js/jquery/jquery.js?ver=1.7.1"></script>';
echo '<script type="text/javascript" src="'.get_bloginfo( 'stylesheet_directory' ).'/assets/js/custom-login.js" /></script>';
}
add_action( 'login_head' , 'custom_login' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment