A quick php question ?????

by 11 replies
13
Dear Warriors,



Just wanted to ask a quick php question, I have a page on which we have static pictures but i want those pictures to be clickable as currently they don't link to anything the code is

<img src="<?php bloginfo('template_url'); ?>/images/ad1.gif" class="left" alt="" />

now how can i make this code to link to some other website ... i mean the graphic that should link to some other website ...

I hope you get the idea..



Best Regards,



Tirmizi
#programming #php #php scripts
  • It's just HTML you need. Just use the following HTML code:

    <a href="http://google.com">
    <img src="<?php bloginfo('template_url'); ?>/images/ad1.gif" class="left" alt="" />
    </a>

    Just replace google.com of course
  • <a href="YOUR-URL-HERE">
    <img src="<?php bloginfo('template_url'); ?>/images/ad1.gif" class="left" alt="" />
    </a>

    Does that answer your question? Or am I misunderstanding your question?

    - Jared
    • [1] reply
    • Thanks guys , will definatly give it a go ..


      am sure it will work ..




      Tirmizi
      • [1] reply
  • Banned
    [DELETED]
  • Banned
    [DELETED]
  • Instead of border="0" you can also add this to your CSS file:

    Code:
    a img {
      border:none;
    }

Next Topics on Trending Feed