WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Inserting logo in template - not working (5 posts)

  1. nyn
    Member
    Posted 7 years ago #

    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 http://www.duma.com.br and the template I´m using is th Double Header (http://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

  2. drmike
    Member
    Posted 7 years ago #

    What's it being replaced with? I'm wondering if that background declair for header is what's comeing into play.

  3. Evita
    Member
    Posted 7 years ago #

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

    Right in stylesheet:
    #headerimg { background: url(http://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>

  4. drmike
    Member
    Posted 7 years ago #

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

  5. nyn
    Member
    Posted 7 years ago #

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

    http://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!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags