N
N
nbsp542016-05-01 13:05:06
WordPress
nbsp54, 2016-05-01 13:05:06

How to display the last 3 post titles (with date) of the current category?

How to display the last 3 post titles (with date) of the current category? Example here: https://drive.google.com/file/d/0B3GTnfvIETMxU0Vuc...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
ValeraValera, 2016-05-01
@cluberr

<?php $myPost = new WP_Query ('cat= CATEGORY_ID &post_per_page=3');
while ($WP_Query->have_posts() ): $wp_query->the_post();
?>
<?php the_title(); ?>
<?php endwhile; ?>

N
nbsp54, 2016-05-03
@nbsp54

Thanks for the answer, but I need to open the current category (post).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question