Title: A problem in archive.php
Last modified: August 19, 2016

---

# A problem in archive.php

 *  [y4](https://wordpress.org/support/users/y4/)
 * (@y4)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/a-problem-in-archivephp/)
 * $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)

 *  Thread Starter [y4](https://wordpress.org/support/users/y4/)
 * (@y4)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/a-problem-in-archivephp/#post-1205808)
 * the matter is still current.
 *  Thread Starter [y4](https://wordpress.org/support/users/y4/)
 * (@y4)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/a-problem-in-archivephp/#post-1205833)
 * problem over.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘A problem in archive.php’ is closed to new replies.

## Tags

 * [archive.php](https://wordpress.org/support/topic-tag/archive-php/)
 * [category](https://wordpress.org/support/topic-tag/category/)
 * [problem](https://wordpress.org/support/topic-tag/problem/)
 * [tag](https://wordpress.org/support/topic-tag/tag/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [y4](https://wordpress.org/support/users/y4/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/a-problem-in-archivephp/#post-1205833)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
