more than one client carousel

Hi all

This is my first post but I hope someone can help.

I am building a website using a theme that uses a template builder that includes a client scrolling carousel. When using it once it works fine… I need to use it 3 times. The second and third instance doesn’t scroll and appears huge on the page.

I am a novice at php but after a bit of research I believe its something to do with how the builder calls for the carousel and the ID. I am not sure how to amend the php to make each instance of the carousel have a different ID and consequently js and css div classes are called correctly.

I hope this make sense and any help would be much appreciated

Craig

Well we can’t do anything without your code.

oh yeah sorry… this is the file from the page builder:

<?php class AQ_Clients_Block extends AQ_Block { //set and create block function __construct() { $block_options = array( 'name' => 'Clients', 'size' => 'span12', 'resizable' => 0, 'block_description' => 'Add your client logos
to the page.' ); parent::__construct('aq_clients_block', $block_options); }//end construct function form($instance) { $defaults = array( 'pppage' => '10', 'filter' => 'all' ); $instance = wp_parse_args($instance, $defaults); extract($instance); $args = array( 'orderby' => 'name', 'hide_empty' => 0, 'hierarchical' => 1, 'taxonomy' => 'client-category' ); $filter_options = get_categories( $args ); ?>
<p class="description">
	<label for="<?php echo $this->get_field_id('pppage') ?>">
		Posts Per Page
		<?php echo aq_field_input('pppage', $block_id, $pppage, $size = 'full', $type = 'number') ?>
	</label>
</p>

<p class="description">
	<label for="<?php echo $this->get_field_id('filter') ?>">
		Show Clients from a specific category?<br />
		<?php echo ebor_portfolio_field_select('filter', $block_id, $filter_options, $filter) ?>
	</label>
</p>
	
<?php
}//end form

function block($instance) {
	extract($instance);

	$query_args = array(
		'post_type' => 'client',
		'posts_per_page' => $pppage
	);
	
	if (!( $filter == 'all' )) {
		if( function_exists( 'icl_object_id' ) ){
			$filter = (int)icl_object_id( $filter, 'client-category', true);
		}
		$query_args['tax_query'] = array(
			array(
				'taxonomy' => 'client-category',
				'field' => 'id',
				'terms' => $filter
			)
		);
	}

	$clients_query = new WP_Query( $query_args );	
?>
	
	<div class="wow fadeIn pad45" data-wow-offset="80">
		<div id="clients-carousel">
		
			<?php 
				if ( $clients_query->have_posts() ) : while ( $clients_query->have_posts() ) : $clients_query->the_post(); 
					
					get_template_part('loop/content','client');
					
				endwhile;
				else : 
					
					/**
					 * Display no posts message if none are found.
					 */
					get_template_part('loop/content','none');
					
				endif;
				wp_reset_query();
			?>
			
		</div>
	</div>	
	<div class="pad45"></div>
		</div>
<?php	
}//end block

}//end class

it looks like a class isn’t being called more than once… if that helps. sorry like I said I am a novice and have only dabbled in php in the past

Sponsor our Newsletter | Privacy Policy | Terms of Service