• Resolved peterjharrison

    (@peterjharrison)


    Hi,

    Was wondering fi anyone had come across this issue before and knows how to fix it?

    I’ve added this piece of code before my loop.

    $args = array( 'post_type' => 'events', 'post_status' => 'future', 'order' => 'DESC');

    It display my future custom posts fine on the first page but when I click ‘view older posts’ to go to ‘/page/2/’ I get my 404 page.

    Any help would be much appreciated.

    Many Thanks
    Pete

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter peterjharrison

    (@peterjharrison)

    Hi,

    Ok it seems to be showing the 404, regardless of the query_posts($args);.

    In my website settings I have my ‘Front page displays’ setting set to ‘A static page (select below)’ and have selected a page for my ‘Posts page’.

    It is on this where I am getting this error. Im currently using ‘Twenty Ten 1.1’ theme on WordPress v3.0.4.

    Can anyone help me work out why I am getting a 404 page when I click ‘older posts’?

    Thanks
    Pete

    Thread Starter peterjharrison

    (@peterjharrison)

    Hi,

    Ok so it works ok if I set the ‘Front page displays’ setting to ‘Your latest posts’ but not when I set it to ‘A static page’.

    Am I doing something stupid here?

    Cheers
    Pete

    Thread Starter peterjharrison

    (@peterjharrison)

    Hi,

    Ok i found out what the issue was, I have a custom post type called ‘events’ and a page called ‘events’ so it was getting confused.

    I renamed the events page ‘upcoming-events’ and it worked.

    Pete

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using $args showing 404 on page 2’ is closed to new replies.