WordPress.org

Ready to get started?Download WordPress

Forums

Infinite paginated pages with query_posts (1 post)

  1. andreu
    Member
    Posted 3 years ago #

    Hi!

    I'm using a custom query in my homepage to show only one category instead of showing all the categories. I have the correct control of the pagination and I'm also showing to total number of pages and the current page with the PageNavi plugin.

    The problem is that, for Worpdress, i have unlimited pages. I mean, If I write manually the URL of the page 200 (mywebsite.com/page/200) i can visit that page although it doesn't contain any post.

    How can I tell to WordPress that this page must be a 404 error page instead of the valid page it is interpreting?

    The same pagination method implemented directly in a category works fine (for example in mywebsite.com/category/category-name/page/200 displays a 404 error), I don't understand why it's not working on my homepage.

    Any ideas?

    Thanks in advance!!

Topic Closed

This topic has been closed to new replies.

About this Topic