• Resolved goodlookin1

    (@goodlookin1)


    I just added the Sampression Lite template to my website and I am having a strange issue. When I add a logo into the header and cut out the header text, everything is put into a funny format: The logo appears on the right side instead of the left and the menubar, and the two pieces are nearly centered instead of aligned to the left and right edges of the content pages.

    Any idea what could be causing this? I looked at the header php file but nothing glaring jumped out at me. Granted, I’m not that well versed in PHP but I can usually follow it well enough to be dangerous.

    My website is: https://www.firearmreviews.net

    Any idea what this glitch could be caused by?

    Thanks. And great template by the way!

Viewing 6 replies - 1 through 6 (of 6 total)
  • It’s just a thought, but looking at your page source it seems like the image has just been added in after the rest of your header content. Your site title is also still showing as existing (on the left, as you’ve mentioned) but isn’t displaying any text.

    My advice would be to take a look at your header.php file and move this:

    <a href="https://www.firearmreviews.net/"><img src="https://www.firearmreviews.net/wp-content/uploads/2013/05/cropped-logo1.png" class="header-image" width="450" height="67" alt="" /></a>

    To just inside this:

    <div class="columns nine">

    And see if that solves the problem / changes anything. If it does – great! If not, let me know and I’ll help you figure out what else the issue might be.

    Thread Starter goodlookin1

    (@goodlookin1)

    Thank you so much! That did it. I did have to search for a little bit trying to find the piece of PHP code that actually creates the code you said to change out….Looked like this:

    <?php $header_image = get_header_image();
    if ( ! empty( $header_image ) ) : ?>
    “><img src=”<?php echo esc_url( $header_image ); ?>” class=”header-image” width=”<?php echo get_custom_header()->width; ?>” height=”<?php echo get_custom_header()->height; ?>” alt=”” />
    <?php endif; ?>

    But this generates the HTML to be exactly what you mentioned:

    <img src=”https://www.firearmreviews.net/wp-content/uploads/2013/05/cropped-logo1.png&#8221; class=”header-image” width=”450″ height=”67″ alt=”” />

    Simply moving it after the “columns nine” div class solved it. Appears to be a bug in the code….not sure why others arent having the same problem? Oh well, I digress. Thanks again!

    No problem at all! I’m glad I could help and you were able to find the code; its sometimes tricky figuring out what line translates into which bit of html so kudos.

    If anything else comes up with your child theme let me know and I’ll help out if I can!

    Heather

    Thread Starter goodlookin1

    (@goodlookin1)

    Like I said, just enough to be dangerous ??

    Thanks again.

    Hi goodlookin1,

    I’m having the same problem as you did but I don’t understand the solution TylinaVespart provided.

    I’ve put my logo into the background but that creates a problem. I can’t make it clickable to go to my Home page. I saw that you have managed to make your header image clickable.Did you put your image in the background or in the header page?

    Can you please help me out?

    My site is https://www.correctum.nl

    Thanks

    Thread Starter goodlookin1

    (@goodlookin1)

    Hi Matuzalem,

    I am pretty sure that the designer of this theme did not intend to have the logo inserted into the Background. If you put it into the Header like intended, I believe it automatically links it to your homepage by default.

    This is not to say that what you want could not be done, but you would likely need to open up the Background PHP file and wrap a link code around the logo image so that when it is inserted, it will also become a link.

    I’m not 100% on this, but just trying to give you some direction. Maybe someone smarter than I can confirm (or deny and correct me) on this.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Adding Logo Image Rearranges Header Formatting’ is closed to new replies.