Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
WordPress theme Editing: Cant make image a clickable link
Old 05-22-2009, 09:10 PM WordPress theme Editing: Cant make image a clickable link
Junior Talker

Posts: 2
Trades: 0
Hey guys,
The only PHP experience I have is editing Wordpress themes. Usually I do a pretty good job of it. I can figure things out and add or remove code as needed.

However, this one has me stumped.

The creator has made a custom box for inserted images. I want to make these images clickable and have them link to other sites.

Here is the code that makes the image area.
PHP Code:
 div class="tumbr" style="z-index:2;margin-left: 10px;float:right; width: 295px; height: 290px; background: url(<?php if($image_src != '') { echo $image_src; } else { ?><?php bloginfo('template_directory'); ?>/images/no-img.gif<?php ?>) 0 0 no-repeat; content: ".";"> </div>
I've already tried to simply add the html code to the the image in the post section of wordpress.

I've also tried to use the wordpress UI to add the link address to the uploaded image.

Thanks guys.
westnile is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-23-2009, 06:36 AM Re: WordPress theme Editing: Cant make image a clickable link
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
The reason it's not clickable is because you have no made it a link (that <a> tag chap):
PHP Code:
<a href="#">
<div class="tumbr" style="z-index:2;margin-left: 10px;float:right; width: 295px; height: 290px; background: url(<?php if($image_src != '') { echo $image_src; } else { ?><?php bloginfo('template_directory'); ?>/images/no-img.gif<?php ?>) 0 0 no-repeat; content: ".";">
</div>
</a>
However, most people would use a <img> tag to insert images, not just CSS on it's own.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 05-23-2009, 02:26 PM Re: WordPress theme Editing: Cant make image a clickable link
Junior Talker

Posts: 2
Trades: 0
Thanks, that was mildly helpful. Unfortunately for me it means that every image must share the same link. I wanted each image to have a different link.
westnile is offline
Reply With Quote
View Public Profile
 
Old 05-26-2009, 03:14 AM Re: WordPress theme Editing: Cant make image a clickable link
anderswc's Avatar
Super Talker

Posts: 132
Name: Will Anderson
Location: Terre Haute, IN
Trades: 0
When you wrap the link around your image, you set the "href" which is where it links to. You can make this different for reach link
__________________
Will Anderson

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
anderswc is offline
Reply With Quote
View Public Profile Visit anderswc's homepage!
 
Reply     « Reply to WordPress theme Editing: Cant make image a clickable link
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.46337 seconds with 12 queries