[Feature Request] Login Logo
-
Hello,
This is just a feature request but it would be neat to have either a Customizer or Theme Setting option to switch out the
/wp-login.php
WordPress logo with the site specific logo. It could look something like:function prefix_login_logo() { $custom_logo_id = get_theme_mod( 'custom_logo' ); if( empty( $custom_logo_id ) ) { return; } $image_url = wp_get_attachment_image_url( $custom_logo_id, 'full' ); $image_atts = wp_get_attachment_image_src( $custom_logo_id ); ?> <style type="text/css"> body.login div#login h1 a { width: 100%; height: <?php echo esc_attr( $image_atts[2] ); ?>px; background-size: contain; background-image: url(<?php echo esc_url( $image_url ); ?>); } </style> <?php } add_action( 'login_enqueue_scripts', 'prefix_login_logo' );
It could also be cool to use the
login_headerurl
andlogin_headertext
filter hooks to replace the URL and description too.Just an idea, thanks for your work on this theme and keep being awesome!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Feature Request] Login Logo’ is closed to new replies.