• Resolved nyn

    (@nyn)


    Hi, I′m really new at this and I′ve read lots of topics about inserting logos in template files, but I′m still doing something wrong.

    My wordpress site is https://www.duma.com.br and the template I′m using is th Double Header (https://www.wpdesigner.com/free-themes/double-header/ ). I′m learning where and how to change colours, so pls don′t mind the rainbow there ?? I want to insert my logo but maintain the site name and description (and make everything clickable).

    I put the logo in the image folder inside the theme folder (the name is logo_vinho_web.jpg). I added this line in the Style.css, above the following:

    #header{
    margin: 0 auto;
    width: 780px;
    height: 114px;
    text-align: left;
    vertical-align: top;
    background: #FFFFFF;
    color: #CD9B1D;

    now I added here:

    #headerimg { background: url(‘<?php bloginfo(‘stylesheet_directory’); ?>/images/logo_vinho_web.jpg’) no-repeat top;}

    In the header.php file I added:

    <div id=”header”>
    <div id=”headerimg”><img src=”images/logo_vinho_web.jpg” width=”190″ height=”190″ border=”0″>
    <h1>“><?php bloginfo(‘name’); ?></h1>
    <div class=”description”>
    <?php bloginfo(‘description’); ?>
    </div>
    </div>
    </div>

    But the image flashes briefly and disappears. Oh, and I really don′t know how many pixels I should put in the logo image line, it′s a square logo..

    I′m really trying to learn, but I′m still at the beginning, so pls pls give me a hand here…

    thank you very much for your time

Viewing 4 replies - 1 through 4 (of 4 total)
  • What’s it being replaced with? I’m wondering if that background declair for header is what’s comeing into play.

    Hi!
    You can′t use PHP in your stylesheet.

    Right in stylesheet:
    #headerimg { background: url(https://duma.com.br/wp-content/themes/double-header/images/logo_vinho_web.jpg) top left no-repeat;}

    and in header.php:

    <div id="header">
    <div id="headerimg">
    <h1><?php bloginfo('name'); ?></h1>
    <div class="description">
    <?php bloginfo('description'); ?>
    </div>
    </div>
    </div>

    Good catch. I missed that. I was thinking that they were doing that in their header.php. oops silly me. ??

    Thread Starter nyn

    (@nyn)

    Thank you so much Evita and drmike, I think I′m almost there!

    https://www.duma.com.br

    Now I have to put the logo at the left side of the header, and put the site description and name on rest of the space.

    The logo looks too big (you can only see the top of it right now), so how do I resize it? I have to resize the original image and upload it again or there is a command line to do it?

    Thank you so much again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Inserting logo in template – not working’ is closed to new replies.