get 1 post only
-
hey guys,
just have some prob, how do i query only 1 post? i tried:<?php $posts = get_posts( “category=5&post=30” ); ?>
<?php if( $posts ) : ?>
<?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
<?php the_content(); ?>Last updated: <?php the_time(‘M j, Y’) ?> <?php edit_post_link(‘Edit’); ?>
<?php endforeach; ?>
<?php endif; ?>i think this
<?php $posts = get_posts( “category=5&post=30” ); ?> is wrong. it doesn’t pull 1 post but retreive all posts in cat5. how can i limit it to cat5 but get postid 89 ?tnx
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘get 1 post only’ is closed to new replies.