WordPress.org

Ready to get started?Download WordPress

Forums

A problem in archive.php (3 posts)

  1. y4
    Member
    Posted 4 years ago #

    $category = get_the_category();
    $kat_id = $category[0]->cat_ID;
    if(kat_id == 3) { MY POST STYLE }

    $category = get_the_category();
    $kat_id = $category[0]->cat_ID;
    if(kat_id == 4) { MY POST STYLE }

    I've written the code above in to a loop in the archive.php, in order to make different styles for each category. There's no problem about the first pages, but other pages such as second, third etc. can't be accessable, they give error 404 from 404.php in my template.

    Also tag archive pages won't open except the first ones but there isn't any problem in date archives ( year, month, day). At first, i'm suspicious about "if tag" , i wonder if i used them wrong, but nothing about it. It also doesn't help, whether i use functions like the_title() , instead of mines. I also didn't give the command for tag pages for any change, i can't understand the problem in them yet.

    I think, problem is somewhere else, also my .htaccess is clean as it is.
    where else it could be? i'm looking to hear your responses.

    thanks!

  2. y4
    Member
    Posted 4 years ago #

    the matter is still current.

  3. y4
    Member
    Posted 4 years ago #

    problem over.

Topic Closed

This topic has been closed to new replies.

About this Topic