WordPress.org

Ready to get started?Download WordPress

Forums

Why does my permalink keep returning 404 error code? (1 post)

  1. fp2x
    Member
    Posted 1 year ago #

    I have a custom type on my wordpress site called 'movie'.

    If the user type this URL : http://mysite.com/1994,
    I would like to display all movies published in 1994.

    Unfortunately, I get a consistent 404 error. When I call get_post_type in index.php(that is the template page called since I didn't defined 404.php), it displays 'movie' but I have no movie called 1994... at least not yet.

    I have pretty permalinks ON.

    If I ask the rewrite rule inspector to check the URL, here is the result for http://mysite.com/1994:

    ([0-9]{4})/?$ index.php?year=$matches[1] date
    (.?.+?)(/[0-9]+)?/?$ index.php?pagename=$matches[1]&page=$matches[2] page
    ([^/]+)(/[0-9]+)?/?$ index.php?name=$matches[1]&page=$matches[2] post

    What am I missing?

Topic Closed

This topic has been closed to new replies.

About this Topic