query_posts() including pages instead of posts
-
I’m using the following code / query to output the most recent default post type:
<?php query_posts('post_type=post&posts_per_page=1'); ?> <a href="<?php the_permalink(); ?>"> <img src="<?php echo getPostThumbnailUrl('feed-news-footer'); ?>" alt="<?php the_title(); ?>" /> </a> <a class="date" href="<?php the_permalink(); ?>"><?php the_time('d M Y'); ?></a> <h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4> <?php wp_reset_query(); ?>
However it is outputting a page instead on a default post type.
Has anyone else had this problem?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘query_posts() including pages instead of posts’ is closed to new replies.