WordPress PHP Code HELP!!!
Posted: Thu Dec 10, 2009 6:30 pm
I am trying to have it so when they click the image link for this script it doesn't take them to another page but I want it to just show the image in "thickbox" classs. I just can't get the script to have it where if one of the revolving images is clicked it shows the large version of it in thickbox. Could someone help me out? Here is the code that needs to be changed.
<div class="span-16">
<div class="frame_tl"><div class="frame_tr"><div class="frame_br"><div class="frame_bl">
<div class="featured clearfix">
<div id="featured-slideshow">
<?php query_posts('cat=11'); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php
$attachments = get_posts('include='.$post->ID.'&orderby=rand');
if ($attachments) {
$x= 0;
$cti = catch_that_image($post->post_content);
foreach ($attachments as $attachment) {
//$img_src = wp_get_attachment_image_src($attachment->ID,'full',false);
echo ($x > 0 ? '<div style="display:none;">' : '<div>');
?>
<a class="featured-article" href="<?php bloginfo('url'); ?>/?p=<?php echo $post->ID; ?>" style="<?php if (isset($cti)) : ?> background: url(<?php echo $cti; ?>) no-repeat;<?php endif; ?>">
<span id="featured-entry" class="featured-entry" style="display:none;">
<span class="entry-title"><?php echo $attachment->post_title; ?></span>
<span class="entry-summary"><?php echo $attachment->post_excerpt; ?></span>
<span class="progress"></span>
</span>
</a>
</div>
<?php
$x++;
} //endforeach
} //endif
?>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>
<div class="span-16">
<div class="frame_tl"><div class="frame_tr"><div class="frame_br"><div class="frame_bl">
<div class="featured clearfix">
<div id="featured-slideshow">
<?php query_posts('cat=11'); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php
$attachments = get_posts('include='.$post->ID.'&orderby=rand');
if ($attachments) {
$x= 0;
$cti = catch_that_image($post->post_content);
foreach ($attachments as $attachment) {
//$img_src = wp_get_attachment_image_src($attachment->ID,'full',false);
echo ($x > 0 ? '<div style="display:none;">' : '<div>');
?>
<a class="featured-article" href="<?php bloginfo('url'); ?>/?p=<?php echo $post->ID; ?>" style="<?php if (isset($cti)) : ?> background: url(<?php echo $cti; ?>) no-repeat;<?php endif; ?>">
<span id="featured-entry" class="featured-entry" style="display:none;">
<span class="entry-title"><?php echo $attachment->post_title; ?></span>
<span class="entry-summary"><?php echo $attachment->post_excerpt; ?></span>
<span class="progress"></span>
</span>
</a>
</div>
<?php
$x++;
} //endforeach
} //endif
?>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>