- This topic has 8 replies, 4 voices, and was last updated 4 years, 10 months ago by David.
-
AuthorPosts
-
April 30, 2019 at 10:33 pm #885103Sebastien
hey
I would like use this code:// changing the login page URL function put_my_url(){ return ('HTTP://WWW.YOUR-DOMAIN.COM/'); // putting my URL in place of the WordPress one } add_filter('login_headerurl', 'put_my_url'); // changing the login page URL hover text function put_my_title(){ return ('NAME OF YOUR WEBSITE'); // changing the title from "Powered by WordPress" to whatever you wish } add_filter('login_headertitle', 'put_my_title');
but I would like to replace put_my_title ; put_my_url ; http://WWW.YOUR-DOMAIN.COM/ by the values I’ve already saved in my Theme.
The aim is to generate the login’s logo-title-url directly with the theme’s datas.
could you help me? where can I find this kind of doc?May 1, 2019 at 5:04 am #885386Sebastienup: any ETA for theme update?? =)
May 1, 2019 at 8:21 am #885702TomLead DeveloperLead DeveloperHi there,
Just to confirm, are you wanting to use the logo you added in the Customizer as the login logo?
May 1, 2019 at 9:01 pm #886107SebastienHi Tom,
Yes I want use :
* the logo added in the customizer as login logo
* the title added in the customizer as text when hover the login logo
* the link of my website (font-end / home) as link when clicking onto the login logothanks for interest !
Another try:
Can we expect GP theme update in days, weeks, months? πMay 2, 2019 at 8:13 am #886774TomLead DeveloperLead DeveloperTry this:
add_filter( 'login_headerurl', function() { return site_url(); } ); add_filter('login_headertitle', function() { return get_bloginfo( 'name' ); } ); add_action( 'login_enqueue_scripts', function() { $logo = wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'full' ); $logo_url = $logo[0]; ?> <style type="text/css"> #login h1 a, .login h1 a { background-image: url(<?php echo $logo_url; ?>); height:65px; width:320px; background-size: 320px 65px; background-repeat: no-repeat; } </style> <?php } );
For the logo, you need to adjust the height, width and background-size.
We’re a couple weeks away from a beta theme version.
May 2, 2019 at 8:26 am #886791Sebastienthanks you so much for the code and for the information about the ETA !
it helps me to take the good decision πMay 2, 2019 at 11:04 am #886935TomLead DeveloperLead DeveloperYou’re welcome π
June 24, 2019 at 11:19 pm #940170MattHi,
https://generatepress.com/forums/topic/replace-logo-login/#post-886774
Does this code need to be added via a hook? Or using a code snippets plugin?
Cheers,
MattJune 25, 2019 at 2:57 am #940327DavidStaffCustomer SupportHi there,
it needs to be added to the Code Snippets plugin or your Child Theme functions.php if you have one.
-
AuthorPosts
- You must be logged in to reply to this topic.