• Resolved [email protected]

    (@bashistamnsinet)


    Trying to add another header more suited to my site, each time I upload a picture from my files it does not resize properly and then is blurry when published. I have tried to risize picture but still is blurry. How can I upload a picture for my header that will be able to be read when published…thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • A link to your site and a note about what theme you are using would help us to answer your question.

    Some templates require a header image to be a certain, fixed size. There are various ways of altering the code to avoid this. Which way is best will depend on the theme.

    Cheers

    PAE

    Thread Starter [email protected]

    (@bashistamnsinet)

    Hello PAE

    Sorry for the late reply, it was to nice a day for November not to go fishing.
    I have since solved my problem in a round about way. My new header needed to be 940×198 pixels, the picture I was trying to use was 198×140 pixels, I did manage to resize (with the edit option from picture folder) the picture but always came out blurry.
    I just looked for the exact size picture that I needed and it seemed to work out fine, for now. This might not always work of course.
    I know how to write a little html code, in a beginner status. I would love to know how to change or alter the code to include all images, to show readable. My site https://rangefinder-golf.org I am now using the twenty one theme

    Thanks

    Hi bashista

    I’m veggie so I can’t go along with the fishing; but I do see what you mean!

    Can I just offer a word of warning about making changes to either the CSS or the HTML code of default themes? If you’re going to do that, you must use a Child Theme. Just in case you were thinking of altering any of the PHP/HTML/CSS…

    The twentyeleven theme sets a height and width for the header image in a couple of PHP constants. I can’t remember exactly where. Possibly in functions.php, but wherever it is, it’s not trivial to change.

    So what I usually do when I use this theme is to remove the header image altogether—which you can do in the ‘Header’ settings, as you know—and then add the code I want in order to add the required image, which is usually a logo, to the header. Something like this, for example:

    <header id="branding" role="banner">
      <img src="<?php bloginfo('stylesheet_directory'); ?>/images/yorkshire_dales_photography_small.jpg" alt="Yorkshire Dales Photography Logo" width="160px" height="54px" />

    (From the site Yorkshire Dales Photography)

    But you have to do something like this is a child theme, remember.

    Cheers

    PAE

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custome header’ is closed to new replies.