Gallery not working and url link not clickable
-
Hello everyone,
I run a business video directory website.
http://www.visitlocal.co.uk/index.php/2009/12/08/get-bike/
The photo gallery and youtube boxes used to be the other way around but since changing them for better viewing, the photo gallery has stopped working when I click on the small thunbnails.
Also the website link should be clickable but not sure how to do that.
Here is the code for my single post.php
<?php /* Template Name: Full Width */ ?> <?php get_header(); ?> <div id="content"> <div id="contentwide"> <div class="postareawide"> <?php include(TEMPLATEPATH."/breadcrumb.php");?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php $args = array( 'order' => 'ASC', 'post_type' => 'attachment', 'post_parent' => $post->ID, 'post_mime_type' => 'image', 'post_status' => null, 'numberposts' => -1, ); $attachments = get_posts($args); ?> <div id="thepost"> <div class="left"> <div class="address"> <h3>Address</h3> <p><?php the_title(); ?></p> <p><?php echo get_post_meta($post->ID, "city_value", true); ?></p> <p><?php echo get_post_meta($post->ID, "state_value", true); ?></p> <p><?php echo get_post_meta($post->ID, "zip_value", true); ?></p> <h3>Contact Details:</h3> <p><strong>Tel:</strong> <?php echo get_post_meta($post->ID, "tel_value", true); ?></p> <?php if (get_post_meta($post->ID, "email_value", true) != ""){ ?> <p><strong>Email:</strong> <?php echo get_post_meta($post->ID, "email_value", true); ?></p> <?php } ?> <?php if (get_post_meta($post->ID, "website_value", true) != ""){ ?> <p><strong>Website:</strong> <?php echo get_post_meta($post->ID, "website_value", true); ?></p> <?php } ?> </div><!--address--> <h3>Photos</h3> <div id="photolarge"> <div id="slideshow"> <?php include 'tools/get_images.php'; ?> <img id="large" src="<?php echo bloginfo('template_url'); ?>/tools/timthumb.php?src=<?php bdw_get_images(); ?>&w=280&h=200&zc=1&q=100" alt="gallery" /> </div> </div> <div id="photothumbs"> <?php if ($attachments) { foreach ($attachments as $attachment) { ?> <script type="text/javascript"> function changeLarge(theSrc){ var thumbSrc = theSrc; var srcLength = thumbSrc.length; var lengthCalc = srcLength - 23; var finalSrc = thumbSrc.substr(0,lengthCalc); var theFinalSrc = finalSrc+"&w=280&h=200&zc=1&q=100"; $("#large").attr({src: theFinalSrc}); } </script> <img onclick="changeLarge($(this).attr('src'))" class="thumb" src="<?php bloginfo('template_directory'); ?>/tools/timthumb.php?src=<?php echo wp_get_attachment_url($attachment->ID);?>&w=30&h=30&zc=1&q=50" alt="<?php the_title(); ?>" /> <?php } } else { echo "<p>There are no images at the moment.</p>"; } ?> </div> <?php include 'tools/maps.php'; ?> <div id="location"> <h3>Location Map</h3> <div id="mapsearch">Loading...</div> </div> <div class="review"> <h3>Description</h3> <p><?php the_content(); ?></p> </div><!--review--> <div id="postcomment"> <h3>User Reviews</h3> <?php comments_template(); ?> </div><!--comments--> </div><!--left--> <div class="right"> </div><!--address--> <div class="youtube"> <h3>Promotional Video</h3> <?php if (get_post_meta($post->ID, "youtube_value", true) != ""){ ?> <?php echo get_post_meta($post->ID, "youtube_value", true); ?> <?php } else { ?> <p align="center">Video coming soon!</p> <?php } ?> </div><!--youtube--> <?php if (get_post_meta($post->ID, "advert_value", true) != ""){ ?> <div id="advert"> <a href="<?php echo get_post_meta($post->ID, "advertlink_value", true); ?>"> <img src="<?php bloginfo('template_directory'); ?>/tools/timthumb.php?src=<?php echo get_post_meta($post->ID, "advert_value", true); ?>&w=385&h=455&zc=1&q=100" alt="Business Advert" /> </a> </div> <?php } ?> </div><!--right--> <div class="clear"></div> </div><!--thepost--> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.', 'studiopress'); ?></p> <?php endif; ?> </div><!--postareawide--> </div><!--contentwide--> </div><!--content--> <?php get_footer(); ?>
Will be very happy if anyone helps me fix it 🙂
Thank you,
N
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Gallery not working and url link not clickable’ is closed to new replies.