• Hi again.

    I’m sorry for this rather beginner question, but I’ve tried many things and I couldn’t get it working.

    I’m using a custom query to display posts on the homepage (index.php):

    $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
    $query=new WP_Query(array(
    	'post_type' =>'release',
    	'paged'	=> $paged,
    	'posts_per_page' => 10,
    	'post__not_in' => $swiftFeatured,
    ));

    Everything works as expected, except when I define a page in the url like this: /page/3/, I’m getting “page not found” error, but again, the expected posts are being displayed without a problem whatsoever.

    I’ve tried changing the permalink structure and reverting it back.

    Any help would be appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Dampos

    (@dampos)

    Looks like this happens only on a dynamic homepage. I’ve created a page template with the same contents, made some adjustments and set the homepage to a static page. It works this way, but it’s not the most elegant solution. I’m still waiting someone more experienced to look into this.

    Thread Starter Dampos

    (@dampos)

    Anyone? Is this a bug?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pagination on custom query’ is closed to new replies.