Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #894366

    Hi Guys

    I want to create a quick function on the enfold theme functions file of my child theme. I am hoping to update the default wordpress logo seen on the login page with the theme logo that is set in the enfold theme settings.

    Is their a function I can use to get the logo url set in the enfold theme settings?

    #894473

    Hey codecreative,

    I’m not sure I understand. You can change the logo in theme options. No need for the code in functions.php. Can you elaborate a bit more?

    Best regards,
    Victoria

    #894530

    Sure no problem

    When you go to your domain.com/wp-admin

    You see a login page asking for username and password. Above this is a default w logo for WordPress. I see many people change that logo it’s easy to do.

    What I want is to get the url for the current logo that has been set in the enfold theme settings. Is there a function to get that url?

    I can then use a filter to apply that to over ride the logo seen on login page. The benefit of this is that if someone updates the logo in the themes settings once it also automatically updates it on the login page.

    #894540

    Hi,

    https://codex.wordpress.org/Customizing_the_Login_Form
    You can use the filter and get the option from the theme options applied there.
    You can check the header.php how to call the proper logo.

    let us know if anything else is needed.

    Best regards,
    Basilis

    #897056

    I almost have it working now. For some reason the css is being applied but I can’t see the logo

    My php is

    /* To set the admin login image */
    function my_login_logo() {
    $logo = avia_get_option(‘logo’); ?>
    <style type=”text/css”>
    #login h1 a, .login h1 a {
    background-image: url(<?php echo $logo; ?>);
    height:auto;
    width:auto;
    background-size: inherit;
    background-repeat: no-repeat;
    padding-bottom: 30px;
    }
    </style>
    <?php }
    add_action( ‘login_enqueue_scripts’, ‘my_login_logo’ );

    • This reply was modified 6 years, 10 months ago by codecreative.
    #897058

    Hi

    I would like to say the above function works fine

    The issue I had was the logo I was uploading was far too large to be visible!

    Is there a way to get the dimensions of the logo so the logo a area can be set to fit the size? or too possibly use medium attachment size?

    • This reply was modified 6 years, 10 months ago by codecreative.
    #897293

    Hi,

    If your function is setting the image correctly, then you will likely need CSS to get it showing. Could you post a link to where we can have a closer look please?

    Best regards,
    Rikard

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.