[Support request] Upload logo image manually, how the theme can identify the logo image ?

Home Forums Support [Support request] Upload logo image manually, how the theme can identify the logo image ?

Home Forums Support Upload logo image manually, how the theme can identify the logo image ?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1619540
    Budi

    Hello,

    I want to upload the logo image in /images folder manually, how the theme can identify that file as the logo image ?

    Thanks.

    #1619778
    David
    Staff
    Customer Support

    Hi there,

    you have to assign the Logo in the Customizer > Site Identity.

    #1620931
    Budi

    Is it possible to upload logo file using ftp and assign manually ?
    I do not want additional record in wp_posts table.

    Thanks.

    #1621572
    Tom
    Lead Developer
    Lead Developer

    You can do this:

    add_filter( 'generate_logo', function() {
        return 'THE URL TO YOUR LOGO';
    } );
    #1623004
    Budi

    add_filter( ‘generate_logo’, function() {
    return ‘THE URL TO YOUR LOGO’;
    } );

    I place the above code in functions.php file ?

    for ‘THE URL TO YOUR LOGO’, which one ?

    ‘www.mydomain.com/images/logo.jpg’ or ‘/images/logo.jpg’

    Thanks.

    #1623021
    Elvin
    Staff
    Customer Support

    Hi,

    add_filter( 'generate_logo', function() {
    return 'www.mydomain.com/images/logo.jpg';
    } );

    or

    add_filter( 'generate_logo', function() {
    return '/images/logo.jpg';
    } );

    Should work fine.

    I place the above code in functions.php file ?

    Here’s how to add PHP – https://docs.generatepress.com/article/adding-php/

    So to answer the question, yes you can place it on the bottom part of the functions.php of your child theme.

    Placing it in the functions.php of the parent theme has its risks because any changes you’ve made there will be wiped when the plugin updates.

    #1623030
    Budi

    hello,

    now it works.
    the first row is add_filter( ‘generate_logo’, function( $logo ) {

    Thanks.

    #1623041
    Elvin
    Staff
    Customer Support

    No problem. Glad it works for you. 🙂

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