• Resolved Mihai

    (@mabagief)


    Hello,

    I have a wordpress theme developed by a web designer to whom i do not have access anymore (I work for an environment NGO, the theme was made by a company as a donation, long story).

    I want in the following code to make the slider/carousel to pick up posts which I add into a particular category (let’s say ‘slider’), not the sticky posts.

    <div class="featured_list">
    <ul id="carousel">
    	<?php
    	$args = array(
    		'posts_per_page' => 5,
    		'cat' => 1,
    		'post__in'  => get_option( 'sticky_posts' ),
    		'ignore_sticky_posts' => 1
    	);
    	query_posts( $args );	
    
    	while ( have_posts() ) : the_post(); ?>
    	<li>
    		<?php the_post_thumbnail( 'featured-post' ); ?>
    		        			<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
    		        			<p><?php  $excerpt_feat = get_the_excerpt();
         	echo shiftms_string_limit_words($excerpt_feat, 20);?></p>
    	</li>
    	<?php
    	endwhile;
    	wp_reset_query(); ?>
    </ul>
    <div class="clear"></div>
    <div id="pager" class="pager"></div>
    </div><!-- .featured_list -->

    The website is intranzitie.org

    Any ideas?
    Thanks/

Viewing 1 replies (of 1 total)
  • Thread Starter Mihai

    (@mabagief)

    I have fixed the issue by removing line
    'post__in' => get_option( 'sticky_posts' ),
    and then changing the 'cat' => 1, to the number of the category id I wanted to display.

Viewing 1 replies (of 1 total)
  • The topic ‘slider help’ is closed to new replies.