Wordpress Login and Register pages no body class or id -
i need insert background image on these 2 pages:
http://digesale.com/wp-login.php http://digesale.com/wp-login.php?action=register
you can see background there, inserted wrapping div div. on smaller or larger screen resolutions background doesn't cover entire page or has slider, depending on if it's bigger or smaller resolution.
what need somehow style "body" of these 2 pages css. body tag has no class , no id on these pages, , have no idea how style it.
for example page http://digesale.com/privacy-policy/ has this:
body class="page page-id-154 page-template-default
and see how it's nicely styled , everything.
can help?
following should work you:-
add_action( 'login_enqueue_scripts', 'wdm_style', 10 ); add_action( 'wp_enqueue_scripts', 'wdm_style' ); function wdm_style(){ $actual_link = "http://$_server[http_host]$_server[request_uri]"; //its check if register page called or not if( (strpos($actual_link, 'wp-login.php') !== false) || (isset($_get['action']))){ ?> <style> body{ background-image: url('your-image-path-here'); } </style> <?php } }
Comments
Post a Comment