WordPress.org

Forums

Paging Problem (1 post)

  1. fire-enigmax
    Member
    Posted 7 years ago #

    I have used the code below to sort my posts in ascending order by ID. This works fine however I seem to be having a problem when the number of posts becomes bigger than the number of posts visible.

    <?php $wp_query = new WP_Query('orderby=id&order=asc'); ?>

    If there is more than one 'page' of posts, the first one that is displayed is the last rather than the first. Is there any way of changin this behaviour?

    Example -- Category 13 has 30 posts but the visible posts is 10... When a user clicks on the link to view category 13 posts he/she is taken to the 3rd page of posts which shows the most recent (I want them to go to the last page as default and see the first post first, hence the ASC setting!)

    Any help would be great.

Topic Closed

This topic has been closed to new replies.

About this Topic