0

I have posts that I paginate, instead of showing them on their single post page I would like to show them on the archive page. I've built my own archive-page with custom functions. I just added

news-archive.php

$news_args = array(
  'post_type' => 'post',
  'post_status' => 'publish',
  'posts_per_page' => 5,
  'paged' => $paged
);
$news = new WP_Query($news_args);
...

So I have another page where I show the latest news on, and a snippet of that news. When clicked on the news link I would like it to go to the correct page number on the archive.

How can I accomplish this?

thanks in advance

  • Conditionally, 5 news should link to the same page as you are showing of 5 posts per page on news-archive.php template ? And the "another page where U show the latest news on" should link to calculated archive page ? – Shazzad May 15 '14 at 17:06
  • @Shazzad That's correct! – Philip May 15 '14 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.