WordPress.org

Ready to get started?Download WordPress

Forums

please help! category doesn't work (3 posts)

  1. jelleafish
    Member
    Posted 5 years ago #

    Whenever I click on the categories they go to index.php, not archive.php or category.php. I basically can't see my category archives.

    I tried to force the main page to refer to archive.php as a template when it went to the category archive, by putting this code in functions.php:

    <?php if ( is_category('8') ) {

    include(TEMPLATEPATH . '/archive.php');

    }

    ?>

    But instead of recognizing is_category('8') as the category archive, the blog thinks I want all posts under category 8 to have archive.php as a template. Was functions.php the right place to put it? Is this even the right code to use?

    I would appreciate ANY help. This problem has consumed way too many hours of my life to admit...

  2. iridiax
    Member
    Posted 5 years ago #

    Remove this code from your functions.php and then check if you are having permalinks problems (click on a link to a page or a single post and see if it also loads the index.php). Themes without a 404.php file will load the index.php if a page is not found (a 404 error).

  3. jelleafish
    Member
    Posted 5 years ago #

    Hmm, it seems like that is and isn't the case. With some parts like individual posts and the monthly archive, page.php and archive.php load perfectly fine and I can customize them. But with categories and also my "older posts" button, the index just loads. The theme that I have also came with a 404.php file, so I am also wondering why the error page did not just appear.

    What should I do so that those pages are "found"? You can click around at katieharrison.net84.net to see what I mean, if that helps...

Topic Closed

This topic has been closed to new replies.

About this Topic