Support » Fixing WordPress » How to limit cycle for the lightbox gallery?

  • There is a carousel which consists of posts. Each post has a gallery. lightbox works with all the posts and galleries.
    Question – How to limit the effect of the lightbox within a post or a gallery in a post?

    This post code within carousel

    <div id="content">
    	<div id="carousel">
    <?php query_posts( array('cat' => 1, 'showposts' => 18) ); ?>
    	 <?php if (have_posts()) : while (have_posts()) : the_post();?>
    	<div <?php post_class(); ?>>
     if ( has_post_thumbnail()) {
       $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
       echo '<a href="' . $large_image_url[0] . '" >';
       echo '</a>';
    		<div class="excerpt">
    		<h1><?php the_title(); ?></h1>
    			<p><?php the_excerpt(); ?></p>
    		<div class="entry-content">
    <?php the_content(); ?>
    <?php endwhile; ?>	
     <?php endif; ?>
    <a href="#" id="ui-carousel-next"><span>next</span></a>
    				<a href="#" id="ui-carousel-prev"><span>prev</span></a>
    				<div id="pages"></div>
    </div><!-- end content -->

    Gallery placed in <?php the_content(); ?>

    This script who add lightbox class to all img

    <script type="text/javascript">
    var select = $('.post-49, .post-1 ').find('a[href$=".bmp"],a[href$=".gif"],a[href$=".jpg"],a[href$=".jpeg"],
    select.attr('class', 'lb_rlightbox');
    $( ".lb_rlightbox" ).rlightbox();

    as is evident from the first code I changed class post. post at <div <? php post_class ();? >> thought that by writing the script, separate classes for each post will solve the issue .. Lightbox but in this case, create a gallery for those posts that I prescribed in the script, and combines them into one big Lightbox gallery …

    It is necessary that they are not connected and worked separately.
    I would be grateful for any information in this regard.

  • The topic ‘How to limit cycle for the lightbox gallery?’ is closed to new replies.