Hello PHPfreaks....
I am not a freak yet since i have no idea about PHP but i am hoping i will become one since this programming language is so important!
I am now working on a wordpress website and i need to customize the theme. I found my way around in doing most of the stuff but now
i am having difficulties adding a url link when user clicks on a photo
The code goes like this:
case 'brick5':
$w = 144;
$h = 294;
$shorten = esc_html( get_the_content() );
$shorten = galleryShorten($shorten, 300, '...');
$content = '<div class="colorInside"></div>
<a title="'.get_the_title().'" class="lightbox_image" href="'.$image_url.'"></a>
<div class="boxInside">
<div class="boxMargin">
<div class="brickTitle">'.get_the_title().'</div>
'.$shorten.'
</div>
<a class="brickMore" href="'.get_permalink().'"></a>
</div>';
$content .= '<img alt="'.get_the_title().'" src="'.get_bloginfo("template_url").'/lib/img.php?f='.$image_url.'&w='.$w.'&h='.$h.'&a=c" />';
break;
This code is actually adding an image (called brick5 in php) on my homepage ... when user clicks photo a light box image opens up with that photo in there... When you click on brickMore (which is a small + jpeg sign inside brick5) its takes you the post..
What i need to do is to change this so code so that when user clicks on photo, instead on lightbox it goes to this link "www.somelink.com" ... The same with brickMore...instead of going to the post it should go to that link
I tried this:
case 'brickCustom':
$w = 294;
$h = 144;
$shorten = esc_html( get_the_content() );
$shorten = galleryShorten($shorten, 300, '...');
$content = '<div class="colorInside"></div>
<a title="'.get_the_title().'" href="http://www.somelink.com"></a>
<div class="boxInside">
<div class="boxMargin">
<div class="brickTitle">'.get_the_title().'</div>
'.$shorten.'
</div>
<a class="brickMore" href="http://www.somelink.com"></a>
</div>';
$content .= '<img alt="'.get_the_title().'" src="'.get_bloginfo("template_url").'/lib/img.php?f='.$image_url.'&w='.$w.'&h='.$h.'&a=c" />';
break;
It dosent work...am i missing something?
Thanks for your time in looking into this!!!