• Resolved shabbaranks

    (@shabbaranks)


    Hi,

    As the title suggests Im trying to reduce the size of the header on my WordPress site. Ive looked at other recommendations for the code and it suggests modifying the padding but this doesn’t seem to work?

    .site-header {
    	padding: 2.625em 7.6923%;
    }

    Any ideas please?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Can you share the link of your website? It will make it easier to suggest the right solution quickly.

    Thread Starter shabbaranks

    (@shabbaranks)

    Hi,

    Its

    Im also trying to put a logo behind the site description?

    Thanks

    Thread Starter shabbaranks

    (@shabbaranks)

    Sorry that should be a link separate to the content (but you can still click on it)

    Thanks

    Try this code:

    @media screen and (min-width: 61.5625em)
    .site-header {
        padding: 2.625em 7.6923%;
    }
    Thread Starter shabbaranks

    (@shabbaranks)

    Perfect thank you

    Thread Starter shabbaranks

    (@shabbaranks)

    I don’t suppose you know how to put a logo behind the site description?

    Pardon me, but I didn’t understand your point. Do you want to swap the position of logo and site description so site description will come first and logo will be under the site description?

    Thread Starter shabbaranks

    (@shabbaranks)

    I think Im going about it wrong, I was going to add a logo behind the site description as a layer but what is probably easier is creating a site logo with all the information on it as an image and then replacing the site title and description with a logo.

    So to re-phrase my question – how do you replace the site description and title with a logo :O)

    Thanks

    You can replace the title and site description (text) with a logo (image) easily from the customize section.

    1. Uncheck the Display Header Text. It will hide the title and site description
    2. Upload your logo by clicking the Add logobutton

    Please see this image for better understanding.

    Thread Starter shabbaranks

    (@shabbaranks)

    Thanks but it seems they took that option away in twenty-sixteen. I think Ive found a solution now.

    Thread Starter shabbaranks

    (@shabbaranks)

    <div class=”site-branding”>
    <img src=”<?php echo get_template_directory_uri(); ?>-” width=”250px” height=”90px” alt=”Some alt text here”>
    </div><!– .site-branding –>

    This seems to be the solution but I cant link to the logo location – any ideas?

    I am pretty sure that they didn’t removed this option from twentysixteen theme. I captured the above screenshot from twentysixteen theme for you.

    get_template_directory_uri() will retrieve the directory URI of currently active theme. So in your case it will retrieve the following:
    https://schuck-itconsultancy.co.uk/wp-content/themes/SSConsultancy/

    You can upload your logo to this path via ftp and use the above code. You would also like to link your logo to your homepage. You can do it by enclosing your logo in an anchor tag. Try the following code:

    <div class="site-branding">
    <a href="/"><img src="<?php echo get_template_directory_uri(); ?>-" width="250px" height="90px" alt="Some alt text here"></a>
    </div><!-- .site-branding -->
Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Trying to reduce the height of the header’ is closed to new replies.