![]() |
A quick php question ????? 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 |
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 |
Thanks guys , will definatly give it a go .. am sure it will work .. Tirmizi |
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 |
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... :) |
i'll definatly do that ... so there is basically nothing wrong with the code???? |
i'll definatly do that ... so there is basically nothing wrong with the code???? I mean everything else is fine ..... |
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. |
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"); ?> |
In your code: Quote:
Quote:
|
Re: A quick php question ????? Instead of border="0" you can also add this to your CSS file: Code: a img { |
| All times are GMT -6. The time now is 06:13 AM. |