• I was using /%postname%/, made about 10 posts and everything was fine. Changed it today to /%category%/%postname%/ then all my posts were accessible, but when I clicked on the cateorgy name I received a “page not found” error message. I switched the permalink to the default to just use the Post ID and posts and categories were accessible. I then switched it back to /%postname%/ and categories not accessible again. So as it stands the permalink structure is /%category%/%postname%/ and all posts and categories work except now when I click on a sub-category I get the “page not found” error. If possible I would just like to be able to use /%postname%/ again.

    My .htaccess file looks like this which I think is ok. Not sure but from what I’ve read could this be causing the issue?

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    My site is Sprichie.com

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter sprichie

    (@sprichie)

    Update: I used the permalink redirect plugin so at least now the links I have out on the web will still yeild a page when people are clicking through.

    My sub-category “children toys” under “product reviews” still shows a “page not found” error. All main categories show and show the contents within them.

    Thanks,

    Scott

    I am having the same issue. Anytime I click on a sub-category, I get page not found. Visiting a first-level category archive works fine. Did you ever get this resolved?

    I figured out my issue in case anyone comes across this — I was using categories on a custom post type. When I went to view one of the categories that only contained my custom post type, I’d get page not found. The real issue was that the default query only searches for posts (not custom post types). I wasn’t really getting page not found (it wasn’t showing the 404.php template), but it was displaying something like “Sorry nothing was found.” because it didn’t find any posts.

    I had to modify the query on my category.php page to include custom posts:

    <?php
    global $query_string;
    query_posts( $query_string . '&post_type=any' );
    ?>

    And then everything started working.

    In the Permalink Settings section in the wp admin, try placing the following in the Custom Structure field: /%category%/%subcategory%/%postname%/

    I was getting a 404 error when trying to view the posts in a subcategory and this fixed the problem for me.

    Good luck!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘permalink issue causing sub-categories not to be displayed’ is closed to new replies.