Title: Help.. ;-(
Last modified: August 18, 2016

---

# Help.. ;-(

 *  [mrpestcontrol](https://wordpress.org/support/users/mrpestcontrol/)
 * (@mrpestcontrol)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/)
 * I have tryed to do what was posted but it doesn’t work?
 * I want to put a .gif in the side par. I copied this code (< a href=”[http://www.thepestcontrolvideo.com&#8221](http://www.thepestcontrolvideo.com&#8221);
   > <img src=”blog/sb.jpg” >< /a >)
 * into the code in the (sidebar.php) file but the gif does not show up?
 * Man I hate .php code…. please help

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

 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-364966)
 * The fact that you’re linking to a jpeg might have something to do with it.
 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-364967)
 * That’s not PHP. That’s just a simple misunderstanding of the difference between
   absolute and relative paths in html. 🙂
 * Odds are, there’s not a “blog” directory in your theme directory. I’m guessing
   your blog is in /blog of your hosting space. so, just change “blog/sb.jpg” to“/
   blog/sb.jpg” instead and try that.
 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-364971)
 * Also, you don’t actually have the `( )` wrapping your html do you?
    You probably
   should close your img tag to stop problems when you do get the image to show 
   and take out the space between your href and img tags.
 *  Thread Starter [mrpestcontrol](https://wordpress.org/support/users/mrpestcontrol/)
 * (@mrpestcontrol)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-364984)
 * No I don’t have the () that was just for the post.
 * Ok I am not sure even what file I should be editing or were the code is for the
   sidebar? I see a file called side bar but there are two..one in each theme.
 * I open up the sidebar.php file in the theme I am using in notepad2 but I have
   NO idea were to put the code? I am not even sure that the code is right for the
   sidebar to insert the image because I have no clue about edit code.
 * I am lame to all this and I am just trying to understand, I have read,read and
   read…..man is hard for me. So please understand how lame I am to this when you
   are trying to help me…Thanks.
 * HELP!
 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-364986)
 * Try HTML-Kit ([http://www.chami.com/html-kit/](http://www.chami.com/html-kit/))
   for editing your php files. It colour codes PHP and HTML so it should be easier
   to see where to put things.
 * It might be helpful if you posted a little of the surrounding code (1 or 2 lines
   on each side) so we could see where you’re trying to put the image.
 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-364990)
 * If you want it in the sidebar – you have to edit:
    sidebar.php for each theme
   you want it in. Do as Maerk suggested or tell us where in the sidebar you want
   it from your URI.
 *  Thread Starter [mrpestcontrol](https://wordpress.org/support/users/mrpestcontrol/)
 * (@mrpestcontrol)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-364996)
 * Ok I would like this small .gif to be under the search sign in the side bar. 
   My blog page is [http://www.thepestcontrolvideo.com/blog](http://www.thepestcontrolvideo.com/blog)
 * I want my .gif to link to [http://www.thepestcontrolvideo.com](http://www.thepestcontrolvideo.com)
 * Here is the code for the side bar of the theme I am using.
    ———————————————————–
 *  <div id=”sidebar”>
    -  <?php include (TEMPLATEPATH . ‘/searchform.php’); ?>
    -  <!– Author information is disabled per default. Uncomment and fill in your
      details if you want to use it.
    - <h2>Author</h2>
       A little something about you, the author. Nothing lengthy,
      just an overview.
    -  –>
    -  <?php /* If this is a 404 page */ if (is_404()) { ?>
       <?php /* If this is
      a category archive */ } elseif (is_category()) { ?> You are currently browsing
      the archives for the <?php single_cat_title(”); ?> category.
    -  <?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
       You are
      currently browsing the /”><?php echo bloginfo(‘name’); ?>
       weblog archives
      
      for the day <?php the_time(‘l, F jS, Y’); ?>.
    -  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
       You 
      are currently browsing the /”><?php echo bloginfo(‘name’); ?>
       weblog archives
      
      for <?php the_time(‘F, Y’); ?>.
    -  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
       You are
      currently browsing the /”><?php echo bloginfo(‘name’); ?>
       weblog archives
      
      for the year <?php the_time(‘Y’); ?>.
    -  <?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
       You
      have searched the /”><?php echo bloginfo(‘name’); ?>
       weblog archives
       for**‘
      <?php echo wp_specialchars($s); ?>’**. If you are unable to find anything 
      in these search results, you can try one of these links.
    -  <?php /* If this is a monthly archive */ } elseif (isset($_GET[‘paged’]) &&!
      empty($_GET[‘paged’])) { ?>
       You are currently browsing the /”><?php echo 
      bloginfo(‘name’); ?>
       weblog archives.
    -  <?php } ?>
    -  <?php wp_list_pages(‘title_li=<h2>Pages</h2>’ ); ?>
    - <h2>Archives</h2>
 *  -  <?php wp_get_archives(‘type=monthly’); ?>
 *  - <h2>Categories</h2>
 *  -  <?php wp_list_cats(‘sort_column=name&optioncount=1&hierarchical=0’); ?>
 *  <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    <?php
   get_links_list(); ?>
    - <h2>Meta</h2>
 *  -  <?php wp_register(); ?>
    - <?php wp_loginout(); ?>
    - [Valid XHTML](http://validator.w3.org/check/referer)
    - [XFN](http://gmpg.org/xfn/)
    - [WordPress](http://wordpress.org/)
    -  <?php wp_meta(); ?>
 *  <?php } ?>
 *  </div>
 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-364997)
 * Insert between these 2 lines:
    ` <?php include (TEMPLATEPATH . '/searchform.php');?
   >`
 * <!-- Author information is disabled per default. Uncomment and fill in your details
   if you want to use it.
 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-364998)
 * I would put the image right before that last `</div>`. That’ll put your image
   after the “meta” links at the bottom of the sidebar. If you wanted it at the 
   top, you could ut it right after the `<div id="sidebar">`.
 * I’d also use the full URL to the image, not a relative one, I find they cause
   too many errors.
 * Might I also suggest that you put it in a `<p>` element, like this:
 * `<p><a href="http://www.thepestcontrolvideo.com"><img src="www.thepestcontrolvideo.
   com/blog/sb.jpg" /></a></p>`
 * That should make it align nicely in the theme you’re using.
 *  Thread Starter [mrpestcontrol](https://wordpress.org/support/users/mrpestcontrol/)
 * (@mrpestcontrol)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-365005)
 * Ok now we are moving…THANK YOU so much.
 * Now I can make the .gif the way i want it and place it.
 * One other thing.
 * What is the code to center the .gif in the sidebar rather then having it lineup
   with the other links?
 * Thank you again.
 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-365008)
 * What do you mean exactly, could you clarify that?
 *  [prjg](https://wordpress.org/support/users/iiiiiiiv/)
 * (@iiiiiiiv)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-365011)
 * The OP means to centre the picture in the sidebar as opposed to having it aligned
   left or justified like most themes do sidebars.
 * The old fashioned way is to add an align=”center” attribute to the img tag which
   may break validation depending on the doctype, the other and more groovy way 
   is to use something like margin: auto
 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-365020)
 * Ah, I get it now! Change your code to this:
 * `<p id="pestcontrollink"><a href="http://www.thepestcontrolvideo.com"><img src
   ="www.thepestcontrolvideo.com/blog/sb.jpg" /></a></p>`
 * then add this to your stylesheet:
 * `#pestcontrollink { text-align: center; }`
 * You can change “pestcontrollink” to whatever you like.
 *  Thread Starter [mrpestcontrol](https://wordpress.org/support/users/mrpestcontrol/)
 * (@mrpestcontrol)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-365028)
 * You did it again…Thank you..
 * How do you know how to do that?
 * This stuff boggels me!
 * How do you make the .gif move down a bit or up a bit?
 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-365095)
 * You could add a little more to the stylesheet. Change:
 * `#pestcontrollink { text-align: center; }`
 * to:
 * `#pestcontrollink {
    text-align: center; padding-top: 10px; }
 * You can play around with how much spacing you want by changing the number — it’s
   the number of pixels that you want as space at the top.

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

The topic ‘Help.. ;-(’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 15 replies
 * 5 participants
 * Last reply from: [maerk](https://wordpress.org/support/users/maerk/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/help-6/#post-365095)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
