Support » Fixing WordPress » Adding linked images to sidebar?

  • Resolved raine.


    If you look at a screenshot of the site I’m working on, it has a column with Google ads in it:

    I’ve found the code for this in sidebar.php. What I want to do is remove the ads and in its place have a column of simple .gifs or .jpg logos. I’ve tried using ‘img src=’ but all I get is the ‘alt’ text displayed in the sidebar:

    …what I am trying to do is something more like this (using WordPress logo as an example):

    …where each logo is an image file, and (hopefully) clickable to follow a link. How would I do this? I’m pretty decent at .html and it seems to work in .php but I can’t figure this out on WordPress, and I’ve been trying different “solutions” I’ve found online for the last few days, to no avail.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Using the latest version of wordpress FYI

    Hi raine,

    What I’d do is to work directly in the html, like you said.

    First, go to the .php file where you want to place your images : the sidebar, or index.php.

    Then, try to write a simple html call :

    <img src="" width="200" height="150">

    You can add some class or id here, reflected in your CSS file, for exemple:

    <div id="logos">
    <img src="" width="200" height="150">

    and then in style.css:

    #logos {margin-left: 15px;}

    Width and height will be relatives to the size of your .jpg, obviously. You can even set them in auto.

    Making the links:

    <div id="logos">
    <a href="SOMEURL" ><img src="" width="200" height="150"></a>

    You can place also the images between the images your theme provides, or in the folder where WordPress stock the files uploaded with the Media Manager in the Post’s Editor. Just try to get the correct path in src=””.

    If something goes wrong, try to place your folder with the images somewhere else, in the root directory is a good place.

    I think it was folder location for the images, I moved the folder to the root directory and now it’s working perfect. I had a feeling it wasn’t as complicated as I thought, thank you for the walkthrough =)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding linked images to sidebar?’ is closed to new replies.