Support » Fixing WordPress » can anyone help me with loop?!

  • Hi,
    I am working on a page, where i want to display excerpt from a category or post id, with their pictures attached in the main post. i have post couple of times in this forums but no one has answer. can someone help me with this sort of loop??

Viewing 2 replies - 1 through 2 (of 2 total)
  • here is code

    query_posts(array('category_name' => 'news','posts_per_page' => '4','post__not_in'=>get_option('sticky_posts')));
    			<?php while (have_posts()) : the_post(); ?>
    		<div class="post" id="post-<?php the_ID(); ?>">
    			<h3 class="bg">
    				<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
    				<p><?php the_post_thumbnail(array(250,250), array ('class' => 'alignleft')); ?></p>
    				<p><?php the_excerpt(); ?>	</p>
    		<?php endwhile; ?>

    above code will show those post which are not sticky you change parameters of query_posts function

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘can anyone help me with loop?!’ is closed to new replies.