Support » Theme: silverOrchid » How to disable categories from Slider?

  • Hi,

    I would like the Slider to not show three categories, and I want these categories to be shown in the carrousel.

    Does anybody know how this could be done?

    I’ve been “playing” with the Slider.php, but no luck. Here’s the main code:

    $gazpo_settings = get_option( 'gazpo_options');
    	$slider_cat_id = $gazpo_settings['gazpo_slider_category'];
    	//if no category is selected for slider, show latest posts
    	if ( $slider_cat_id == 0 ) {
    		$post_query = 'posts_per_page=4&ignore_sticky_posts=1';
    	} else {
    		$post_query = 'cat='.$slider_cat_id.'&posts_per_page=4&ignore_sticky_posts=1';
    	}
    ?>
    
    <div id="gazpo-slider" >
    		<ul class="ui-tabs-nav ui-tabs-selected">
    			<?php query_posts( $post_query ); ?>
    			<?php if( have_posts() ) : while( have_posts() ) : the_post(); ?>
    			<li class="ui-tabs-nav-item" id="nav-fragment-<?php echo $post->ID; ?>">
    			<a>ID; ?>">
    				<?php the_post_thumbnail( 'slider-thumb' ); ?>
    				<span class="title">
    						<?php $short_title = mb_substr(the_title('','',FALSE),0,40);
    						echo $short_title; if (strlen($short_title) >39){ echo '...'; } ?>
    				</span>
    
    				<span class="date"><?php the_time('F j'); ?></span>
    			</a>
    
    			<?php endwhile; endif;?>
    			<?php wp_reset_query();?>			
    
    		<?php query_posts( $post_query ); ?>
    		<?php if( have_posts() ) : while( have_posts() ) : the_post(); ?>
    		<div id="fragment-<?php echo $post->ID; ?>" class="ui-tabs-panel ui-tabs-hide" style="">
    			<?php the_post_thumbnail( 'slider-image' ); ?>
    			 <div class="info" >


    [Please use the code buttons.]

  • The topic ‘How to disable categories from Slider?’ is closed to new replies.