wordpress image in sidebar is clickable

10 replies
  • WEB DESIGN
  • |
I'm having issues with the sidebar and widgets.
I have placed 2 text-widgets in sidebar which i use to place 1 clickable image in the 1st widget that takes you to a page (works fine) and the 2nd text widget should not be clickable at all as it will be used for a "coming soon image" . So second widget is just an image which should not be clickable at all.
But it is and the link is the same as the first one which is the homepage.



here is the code for 2nd text widget, I've messed with it quite a bit but same thing keeps happening.


<img class="alignnone size-full wp-image-12" title="vid thumbnail 2" src="http://mywebsite.info/blog/wp-content/uploads/2010/07/vid-thumbnail-21.gif" alt="" width="225" height="127" />
#clickable #image #sidebar #wordpress
  • Profile picture of the author nmarley
    It looks like a standard img tag, the only thing I can think of is that the link is in the css or something. What happens if you remove the class attribute completely?
    {{ DiscussionBoard.errors[2343308].message }}
    • Profile picture of the author dynamicic
      Maybe add a </div> or </a> before the second widget code. I couldn't tell you exactly what the problem is unless I look at the actual code on the page and maybe even the php coding in the theme.
      {{ DiscussionBoard.errors[2343497].message }}
  • Profile picture of the author Aronya
    I was wrestling with something like this last week. The whole area of my page's main content was clickable. In my case it was linked to a css popup window that was the same window that a link in my sidebar linked to. Turned out to be an unclosed <a> tag. Might be the same for you. In your case, it would be the link in your first widget that isn't closed.
    {{ DiscussionBoard.errors[2347245].message }}
    • Profile picture of the author johnryan
      I tried closing the tags for the top image but it didn't keep the bottom image in sidebar from being clickable.
      The top image in the right sidebar takes me to correct place.
      Bottom image should not be clickable, its actually for a coming soon video.

      Here is the url:
      http://puppyinmypocket.info/blog/

      thanks for everyone's suggestions
      {{ DiscussionBoard.errors[2347613].message }}
  • Profile picture of the author Aronya
    Your tag isn't closed:

    <div class="textwidget"><a href="http://puppyinmypocket.info/blog/video-1"><img border="0" src="http://puppyinmypocket.info/blog/wp-content/uploads/2010/07/sample-video.gif">



    </div>
    {{ DiscussionBoard.errors[2347908].message }}
    • Profile picture of the author johnryan
      I tried adding the </div> in the 1st text widget but it caused the image in the 2nd text widget to appear on the right side of the 1st image (off of the sheet and on the background) and was still clickable there.

      1st widget looks like this now:
      <a href="http://puppyinmypocket.info/blog/video-1"><img border="0" src="http://puppyinmypocket.info/blog/wp-content/uploads/2010/07/sample-video.gif">


      </div>
      {{ DiscussionBoard.errors[2348410].message }}
      • Profile picture of the author Aronya
        No. Your anchor tag <a> isn't closed.


        Originally Posted by johnryan View Post

        I tried adding the </div> in the 1st text widget but it caused the image in the 2nd text widget to appear on the right side of the 1st image (off of the sheet and on the background) and was still clickable there.

        1st widget looks like this now:
        <a href="http://puppyinmypocket.info/blog/video-1"><img border="0" src="http://puppyinmypocket.info/blog/wp-content/uploads/2010/07/sample-video.gif">


        </div>
        {{ DiscussionBoard.errors[2348762].message }}
        • Profile picture of the author KathyK
          Originally Posted by Aronya View Post

          Code:
          <a href="http://puppyinmypocket.info/blog/video-1"><img border="0" src="http://puppyinmypocket.info/blog/wp-content/uploads/2010/07/sample-video.gif">

          It should look like this:
          Code:
          <a href="http://puppyinmypocket.info/blog/video-1"><img border="0" src="http://puppyinmypocket.info/blog/wp-content/uploads/2010/07/sample-video.gif">    </a>
          Note that last closing
          Code:
          </a>
          tag
          Signature

          Cheers,
          Kathy

          {{ DiscussionBoard.errors[2349361].message }}
  • Profile picture of the author williamkmohr
    now you have changed the errors i think
    {{ DiscussionBoard.errors[2349422].message }}
    • Profile picture of the author johnryan
      Thanks everyone and thank you for the code Kathy, it helped to see it exactly where it needed to be!
      I had tried closing it with <a> instead of </a> and used the </a> in the wrong place earlier.

      mystery solved
      {{ DiscussionBoard.errors[2349623].message }}

Trending Topics