Title: Help needed adding image in header
Last modified: August 19, 2016

---

# Help needed adding image in header

 *  Resolved [TechTalk](https://wordpress.org/support/users/techtalk/)
 * (@techtalk)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/)
 * I’ve managed to alter my site in several ways but am now stuck on adding an image
   to the header. My base theme is copyblogger and here is a list of changes that
   I’ve done:
 * Moved the navbar into the header and adjusted font / padding / margins.
    Changed
   the header text to black for posts. Removed the black and red footer blocks.
 * Here is what my code looks like right now:
    style.css
 *     ```
       #logo { width: 750px; height; 100px; margin: 0 auto; padding: 0em 0em 1em 0em; }
   
       	#logo a { font: normal 5.0em "American Typewriter", "Trebuchet MS", Verdana, sans-serif; color: #fff; }
       ```
   
 * header.php
    _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com)]_
 * My image is located inside the theme folder at “/images/logo.png”
 * I’ve been trying to find the solution through trial and error but I have yet 
   to succeed.
 * Any help would be greatly appreciated.

Viewing 15 replies - 1 through 15 (of 15 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877288)
 * try yo use an absolute path to the image;
 * instead of:
 *     ```
       <div id="logo"><img src="/images/logo.png"></div>
       ```
   
 * try to use:
 *     ```
       <div id="logo"><img src="<?pgp bloginfo('stylesheet_directory'); ?>/images/logo.png"></div>
       ```
   
 * [http://codex.wordpress.org/Function_Reference/bloginfo](http://codex.wordpress.org/Function_Reference/bloginfo)
 *  Thread Starter [TechTalk](https://wordpress.org/support/users/techtalk/)
 * (@techtalk)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877292)
 * I get a syntax error when using your line of code.
 * I’m on my way out the door so I’ll play with it when I get back tonight.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877303)
 * it is supposed to say `php` instead of `pgp`:
 * `<div id="logo"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/logo.
   png"></div>`
 *  Thread Starter [TechTalk](https://wordpress.org/support/users/techtalk/)
 * (@techtalk)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877413)
 * That did the trick, thanks.
 * I’ve got a few more questions I’m hoping you guys can help me out with:
    -  I’d like to have a footer on the bottom where I can add maybe a small slideshow
      of popular posts and some streaming posts from different categories. Is there
      an easy way to go about this?
    - Before my title there is a – hyphen. There isn’t a hyphen in my wordpress 
      control panel so where did it come from and how do I remove it?
 *  Thread Starter [TechTalk](https://wordpress.org/support/users/techtalk/)
 * (@techtalk)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877493)
 * Just wanted to give this thread a bump.
 * I’m looking into the footer myself but more importantly I need to know where 
   the hyphen “-” is coming from in my title so I can remove it.
 * Instead of “Title”, I’m getting “—Title”. There are no hyphens in the wordpress
   control panel.
 * Where is this coming from in the code?
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877499)
 * can you post a link to your site, and the name of your theme?
 *  Thread Starter [TechTalk](https://wordpress.org/support/users/techtalk/)
 * (@techtalk)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877521)
 * [http://www.naturallynerds.com](http://www.naturallynerds.com)
 * The theme name was posted above and is copyblogger.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877525)
 * look into header.php and for the code between `<title> ......... </title>`
 * and then post it here.
 * if you are using a seo plugin, check the plugin settings and options.
 *  Thread Starter [TechTalk](https://wordpress.org/support/users/techtalk/)
 * (@techtalk)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877526)
 * Here’s the code:
    `<title><?php if (is_home()) { bloginfo('description'); } else{
   wp_title('',true); } ?> — <?php bloginfo('name'); ?></title>`
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877527)
 * try:
 * `<title><?php if (is_home()) { bloginfo('description'); ?> &ndash; <?php } else{
   wp_title(' - ',true, 'right'); }; bloginfo('name'); ?></title>`
 * [http://codex.wordpress.org/Function_Reference/wp_title](http://codex.wordpress.org/Function_Reference/wp_title)
 *  Thread Starter [TechTalk](https://wordpress.org/support/users/techtalk/)
 * (@techtalk)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877538)
 * When I switched out the code nothing changed. Any other suggestions?
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877544)
 * this is because you have not entered any content into the blog description (tag
   line) in the settings.
 * try with a conditional tag:
 *     ```
       <title><?php if ( is_home() && get_bloginfo('description') ) { bloginfo('description'); ?> – <?php } else { wp_title(' - ',true, 'right'); }; bloginfo('name'); ?></title>
       ```
   
 *  Thread Starter [TechTalk](https://wordpress.org/support/users/techtalk/)
 * (@techtalk)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877548)
 * That did it, thanks a lot for the help!
 *  Thread Starter [TechTalk](https://wordpress.org/support/users/techtalk/)
 * (@techtalk)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877550)
 * New problem:
 * It appears that my navbar has now changed. The Home button is lower then the 
   others. I can’t see anything in the code that may be causing this. Here’s the
   code:
 * Style.css
    _[CSS moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please just post a link to your site.]_
 * nav_menu.php
    _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 *  Thread Starter [TechTalk](https://wordpress.org/support/users/techtalk/)
 * (@techtalk)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877564)
 * I was able to fix the problem.
 * Thanks for the help guys!

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Help needed adding image in header’ is closed to new replies.

 * 15 replies
 * 2 participants
 * Last reply from: [TechTalk](https://wordpress.org/support/users/techtalk/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/help-needed-adding-image-in-header/#post-1877564)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
