I’m trying to figure out how to display a custom loop with only certain elements in a wordpress loop.
My loop currently contains the title, creation date, author & content.
However I am trying to remove the content for each post in the loop as I do not want it displayed in this list with no luck. I have even removed the_content() out of the loop & it still displays a listing of the post content under the looped section.
Any help would be greatly appreciated,
here is my code:
<?php query_posts('category_name=halloween &posts_per_page=6'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- IF articles then display them -->
<h6><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h6>
<small><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small>
<?php endwhile; else: ?>
<!-- IF no articles were created then show -->
NO Posts Present
<?php endif; ?>
I seemed to have found what i was missing in my code as there needed to be the following snippet of code required at the end of my loop which fixed the issue:
here is the code which I added after my endif