Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1207377

    Am trying to “grab” the logo noted in theme. For church demo, is 324.
    How can I get that file and url so I can use in customizing login?

    Thanks in advance…I found logo.png, but it’s the standard Enfold logo.

    #1207856

    Hey CharlieTh,

    Are you referring to this file?
    https://kriesi.at/themes/enfold-church/wp-content/uploads/sites/49/2015/05/church-logo2.png

    Best regards,
    Victoria

    #1226159

    No, for any site, would like to find the file location of the logo that is set within theme options.

    I would like to use this to show the proper logo on the Login page. I currently have to set that logo manually. It would be nice to know the code to set it for ANY logo on any site.

    I see this code…which looks like it should show me that…but since I am within the child theme, I don’t have the avia_base_url variable.

    $output .= avia_logo(AVIA_BASE_URL.’images/layout/logo.png’, $addition, ‘span’, true);
    echo $output;

    1. Will this give me the file of the logo set within Theme > Options?
    2. How can I use avia_base_url within the child theme?
    3. Any other workarounds to achieve this — i.e., finding the file that contains the logo set within Theme > options?

    Thanks for your thoughts.

    #1226495

    Hi CharlieTh,

    No, this will just give you the default logo, the AVIA_BASE_URL is the constant, it will give you the path to the theme folder.

    There is a filter avf_logo that can be used to work with logo so you can try using it.

    Hooks and Filters

    Also, you can look for the avia_logo function in the /framework/php/function-set-avia-frontend.php file.
    Best regards,
    Victoria

    • This reply was modified 4 years, 5 months ago by Victoria.
    #1232826

    Victoria…sorry I’m not clearer.

    What I want to change is NOT the logo used by the theme itself.

    On login page, I want to replace the W – WordPress logo at the top with the logo the theme is using.

    If in theme options, I’ve put in a Lizard, I’d like to be able to programmatically grab that lizard picture.

    I KNOW how to change the W WordPress logo to _A_ picture. But currently I have to manually SET the picture that is used by the theme already.

    I hope there is a variable WITH that image stored.

    According to the Github reference, the avf_logo is how to CREATE the Enfold logo, I guess — I want the one that’s already chosen on the Options page.
    (Says: Use “avf_logo” filter to change logo.)

    If I can grab string with image, I don’t have to manually set it for any new site.
    This would be far preferable.

    I have the code to change the login page — but have to manually go out and find string representing the Logo for any new site.

    Can you direct me how to find that string representing the logo image, please (hope, hope)?

    Presume the “getter” would be the same for any site using Enfold.

    Thank you!

    #1233630

    Hi,

    Thank you for the info.

    You can get the default logo image ID using this snippet.

    $logo = avia_get_option( 'logo' );
    

    Yes, the logo function can be found in the enfold\framework\php\function-set-avia-frontend.php file > avia_logo.

    To change the login logo, please check the documentation.

    // https://codex.wordpress.org/Customizing_the_Login_Form

    If you only need the default logo, look for the logo.png image in the enfold\images\layout folder.

    Best regards,
    Ismael

    #1240992

    Ismael — the default logo appears to be the actual Enfold image logo.
    Naturally, that is NOT what I want to “grab” to replace the WordPress Logo big W on the Login page.
    I would like to grab the Enfold logo image I set on the Theme Options page — without having to hard-code it into the functions.php for the logiin page

    I have already SET “my” logo on Theme Options.
    That’s the logo I want.
    I do NOT want the Enfold company logo.

    Above, you show me several ways to get the default logo — meaning the Enfold company logo, correct?

    That’s not what I’m hoping to get.

    The logo is already set…how does one obtain the url reference for MY set logo?

    Any ideas?

    I would like NOT to have to hard-code image to set it on every site that uses a little swatch of php code…but instead to GET the logo in a custom way..

    #1241005

    to replace the login logo ( and replace the back link of that logo ) – and to have a background setting on that too:
    you can do this on child-theme functions.php:

    and before the style is set use ismaels snippet to get the url of the logo:

    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: 100px;
                width: 300px;
                background-size: contain !important;
                background-repeat: no-repeat;
            }
            body.login {
                background-image: url(/wp-content/uploads/LOGIN-BG.jpg) !important;
                background-repeat: repeat;
            }
    </style>
    <?php 
    }
    add_action( 'login_enqueue_scripts', 'my_login_logo' );
    
    function custom_loginlogo_url($url) {
      $url = get_site_url();
      return $url;
    }
    add_filter( 'login_headerurl', 'custom_loginlogo_url' );
    

    you had to find your best dimensions on width and height above

    see here: Link

    #1241636

    Hi,


    @CharlieTh
    : Please try to use @Guenni007’s code above to change the default login logo. As we explained previously, you can grab the default logo URL using the avia_get_option function or this line.

    $logo = avia_get_option('logo'); 
    


    @Guenni007
    : Thank you for the code! :)

    Best regards,
    Ismael

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