Help Needed in Inserting Logo and Header in WP

4 replies
Hello guys,

I am too poor programmer and need small help from you.
In My WP THEME the portion of header.php is like this :


<body>

<div id="wrapper">
<!-- Header -->
<div id="header">

<!-- Logo -->
<div id="headerleft">
<h1>
<a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('description'); ?>">
<?php bloginfo('name'); ?></a><span><?php bloginfo('description'); ?></span>
</h1>
</div>

<!-- Searchbox and date -->
<div id="headerright">
<div id="search">
<div id="form">
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
</div>
</div>
<div id="rss">
I want to insert logo in place of blogname. And also a header image. Can you guys help me with a sample code that i need to insert ? And please tell me where to install.

Thanks !
#header #inserting #logo #needed
  • Profile picture of the author rajmeej
    go to css file

    search
    header or logo and past your image url thats all
    {{ DiscussionBoard.errors[4849438].message }}
  • Profile picture of the author hitmobi
    Originally Posted by Baba Pandey View Post

    Hello guys,

    I am too poor programmer and need small help from you.
    In My WP THEME the portion of header.php is like this :



    I want to insert logo in place of blogname. And also a header image. Can you guys help me with a sample code that i need to insert ? And please tell me where to install.

    Thanks !
    OK here's one way to do it:
    go and upload your logo to wp-content/themes/(your theme)/images/

    i wrote the code assuming your filename is logo.png. You can change that yourself.
    <body>

    <div id="wrapper">
    <!-- Header -->
    <div id="header">

    <!-- Logo -->
    <div id="headerleft">
    <h1>
    <a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('description'); ?>">

    <img src="<?php echo bloginfo('template_directory');?>/images/logo.png" alt="<?php bloginfo('name');?>" />

    </a><span><?php bloginfo('description'); ?></span>
    </h1>
    </div>

    <!-- Searchbox and date -->
    <div id="headerright">
    <div id="search">
    <div id="form">
    <?php include (TEMPLATEPATH . '/searchform.php'); ?>
    </div>
    </div>
    <div id="rss">
    {{ DiscussionBoard.errors[4849528].message }}
  • Profile picture of the author SupporTech
    Remove this:
    <?php bloginfo('name'); ?> and this <span><?php bloginfo('description'); ?></span>

    Be careful not to messed up with the <a href=""></a> anchor text,

    Go to: style.css
    insert this:

    Example: Logo name: logo.png, height: 150px, and width: 350px

    .newlogo {
    background: url('logo.png');
    height: 150px;
    width: 350px;
    }

    Then, instead of:

    OLD CODE:
    <div id="headerleft">
    <h1>
    <a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('description'); ?>">
    <?php bloginfo('name'); ?></a><span><?php bloginfo('description'); ?></span>
    </h1>
    </div>

    NEW CODE:
    <div id="headerleft">
    <h1>
    <a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('description'); ?>">
    <div class="newlogo"></div></a>
    </h1>
    </div>

    Just like your css style is, but be sure about the file url of the image!

    Luck!
    {{ DiscussionBoard.errors[4895882].message }}
  • Profile picture of the author SupporTech
    Double Posting, so i deleted this one!
    {{ DiscussionBoard.errors[4895887].message }}

Trending Topics