Support » Fixing WordPress » Pagination for Custom Loop in a 'Page' Giving 404 Error

  • I have a page for news, permalink /news/ I am using a template page-news.php, within this template I’m using a custom loop to retrieve all posts with a post_type of news. Here are my query_posts args.

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>

    <?php query_posts(array('post_type' => 'news', 'posts_per_page' => '2', 'is_paged' => true, 'paged' => $paged )); ?>

    This works fine, I get two posts along with the ‘Old Posts’ link, however when I click the link it sends me to /news/page/2/ which returns a 404 error.

    Any ideas how I can fix this?

  • The topic ‘Pagination for Custom Loop in a 'Page' Giving 404 Error’ is closed to new replies.