• So it seems the excerpt is only being output for the last post.

    any help would be great!

    Here’s the code i’m working with.

    <?php
    		$args = array( 'post_type' => 'ait-item',
    		               'meta_query' => array(
    					        array(
    					            'key' => 'location',
    					            'value' => 'annapolis'
    					        ),
    					        array(
    					            'key' => 'item_tags',
    					            'value' => 'Non-Marine',
    								'compare' => 'NOT LIKE',
    					        )
    					    ),
    					   	'orderby' => 'title',
    						'order' => 'ASC',
    		               'posts_per_page' => 300 );
    		$loop = new WP_Query( $args );
    		while ( $loop->have_posts() ) : $loop->the_post();
    			the_title('<h3><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h3>') ;
    			echo '<div class="entry-content">';
                            the_excerpt();
    			echo '</div>';
    		endwhile;
    	?>

    Thanks!

    Cory-

  • The topic ‘Loop- excerpt only output for last post.’ is closed to new replies.