Support » Fixing WordPress » A problem in archive.php

  • $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!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘A problem in archive.php’ is closed to new replies.