| | #1 |
| Advance Warrior War Room Member Join Date: 2008 Location: Islamabad, Pakistan
Posts: 398
Thanks: 0
Thanked 2 Times in 2 Posts
|
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 |
| | |
| |
| | #2 |
| Spartan Warrior War Room Member Join Date: 2008
Posts: 869
Thanks: 130
Thanked 149 Times in 75 Posts
|
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 |
| | |
| |
| | #3 |
| * Telekinetic Marketing * War Room Member Join Date: 2004 Location: The Matrix
Posts: 1,854
Thanks: 808
Thanked 1,144 Times in 447 Posts
Blog Entries: 25 |
<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 |
| | |
| |
| | #4 |
| Advance Warrior War Room Member Join Date: 2008 Location: Islamabad, Pakistan
Posts: 398
Thanks: 0
Thanked 2 Times in 2 Posts
|
Thanks guys , will definatly give it a go .. am sure it will work .. Tirmizi |
| | |
| |
| | #5 |
| Advance Warrior War Room Member Join Date: 2008 Location: Islamabad, Pakistan
Posts: 398
Thanks: 0
Thanked 2 Times in 2 Posts
|
This is exactly what I was looking for. However, something starnge happened. When I looked at the link after changing , it looked fine. the picture showed an external link to the website that i wanted. But I checked it back again after an hour or so ... and it had some sort of malware thing going on it... like you see on virust websites .... when clicked on it , gave an option for " checking your computer for virus etc' i am pretty much sure that would be some sort of malware or virus .. but how did it get their .... What i wanted to do basically was to put " click bank hop" link on the picture .... so that people would go to the product sales page through that link .... is their an easier way of doing it .. or am i doing something wrong ... for reference do check out the website How to Lose Weight Fast - How to lose weight fast. This website will contain all the relevent information which will help you lose weight fast , I want to put the links on the 125X125 pixel pics on the right side bar .... the code for this is the one that I mentioned in my earlier post ... appreciate your help ... Tirmizi |
| | |
| |
| | #6 |
| White Hat Marketer War Room Member Join Date: 2007 Location: Montgomeryville, PA
Posts: 1,546
Thanks: 77
Thanked 775 Times in 267 Posts
|
Perhaps it's time to do an AdAware/Spybot scan on your own PC to look for malware that would inject ads into your browsing experience... |
| | |
| |
| | #7 |
| Advance Warrior War Room Member Join Date: 2008 Location: Islamabad, Pakistan
Posts: 398
Thanks: 0
Thanked 2 Times in 2 Posts
|
i'll definatly do that ... so there is basically nothing wrong with the code????
|
| | |
| |
| | #8 |
| Advance Warrior War Room Member Join Date: 2008 Location: Islamabad, Pakistan
Posts: 398
Thanks: 0
Thanked 2 Times in 2 Posts
|
i'll definatly do that ... so there is basically nothing wrong with the code???? I mean everything else is fine .....
|
| | |
| |
| | #9 |
| White Hat Marketer War Room Member Join Date: 2007 Location: Montgomeryville, PA
Posts: 1,546
Thanks: 77
Thanked 775 Times in 267 Posts
|
Right... adding a link doesn't cause virus checking graphics to appear... that wasn't what caused it. Either your website was hijacked (but it doesn't look to be), or your computer... so more likely your computer.
|
| | |
| |
| | #10 |
| Banned War Room Member Join Date: 2006 Location: The Hague,Netherlands.
Posts: 1,077
Thanks: 384
Thanked 220 Times in 136 Posts
Blog Entries: 1 |
Nothing wrong with the code. If you want to use an affiliate link make a simple cloak on it. create a file called fi likes.php and in it have something like this <?php $url="http://www.youraffiliatelink"; header("Location: $url"); ?> |
| |
| | #11 | ||
| VIP Warrior War Room Member |
In your code:
| ||
| |
| | #12 |
| Warrior Member War Room Member Join Date: 2010
Posts: 24
Thanks: 4
Thanked 37 Times in 6 Posts
|
Instead of border="0" you can also add this to your CSS file: Code: a img {
border:none;
} |
| |
|
| Bookmarks |
| Tags |
| php, php scripts |
| |