Custom Logo Area Gallery Theme

Hi Guys!

I am using the Gallery Theme and want to use a custom logo. Problem is, the Gallery theme supports rectangular logos by default, and my logos are "squarish". I want to make sure which portion(s) of either header.php or branding-header.php that I need to modify, and replace with my own image. Could you please provide guidance?

  • Vinod Dalvi

    Hi @F. Zaria,

    Thank you for your question.

    To use logo square in size instead of rectangle try making the following change in the below Gallery Theme file on line number 2299.

    Gallery Theme file:
    gallery/library/functions/option-functions.php

    Before Editing:
    aspectRatio: '<?php echo $thumb_width/$thumb_height; ?>:1',

    After Editing:
    aspectRatio: '1:1',

    Note: You are making changes in the theme file and these changes will be overwritten and lost when you update the theme and you will have to make these again after theme updation.

    Best Regards,
    Vinod Dalvi

  • Vinod Dalvi

    Hi @F. Zaria,

    Thanks you for your reply.

    Hi! Thanks, but the solution you provided would not meet my needs, and here is why: The Gallery theme has a glitch. that results in all images uploaded being rendered in ~300 x 300 px regardless of the original size.

    I have tested it on my test site and found the logo image is displaying in the size 400 X 400 after changing its aspect ratio but i can change this size by changing it in the following gallery theme file on line number 2095

    Gallery theme file :
    /gallery/library/functions/option-functions.php

    Code to be changed:

    $thumb_width = 400;
    $thumb_height = 100;

    I think we should develop some theme option to change it easily so i will move this over to the features & feedback section. This way it can be considered for future development, and we can also see what other community members think about the feature request.

    My only question is, which portion(s) of either header.php or branding-header.php that I need to modify, and replace with my own image. Could you please provide guidance?

    You should delete the following code on line number 27 in the header.php file in your child theme and add custom code in place of it. After deleting the following code you don't need to hide branding using the CSS code.

    <?php locate_template( array( '/library/components/branding-header.php' ), true ); ?>

    Regards,
    Vinod Dalvi

    • FZCU

      Vinod,

      Hi and Happy new year! I did not set the logo area to "yes" because my logos are square. Because they are not rectangular, they do not crop properly using the Gallery cropper in the Home Builder section. The Amazon logo you utilized is not the logo that I want to use. I want to use the multi color square logo on the bottom of the page but cannot.

      Thank you for acknowledging how difficult the logo process has been for me. I look forward to the gallery theme update.

  • Vinod Dalvi

    Hi @F. Zaria,

    The Amazon logo you utilized is not the logo that I want to use. I want to use the multi color square logo on the bottom of the page but cannot.

    When i logged in to your site i found you have set the Amazon logo so i made it worked.

    Do you want to use the logo of same size displayed on the bottom of the page as shown in the attached screenshot?

    If yes then would you mind if i check your site for the above changes and made it if required? This might help get to the bottom of this faster. If this is ok, just send log in info through our secured contact form: https://premium.wpmudev.org/contact/
    - Choose "I have a different question"
    - Include my name in the subject "Vinod Dalvi"
    - Include the URL of this post in your message so that I may track this issue better
    - Include login information (Wordpress admin info username + password )
    - Include FTP Details

    Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.