I am using a specific template for one category, it's a mini link catalog on my site. I created a file category-22.php it works wonderful.
I also created subcategories for this cat. But when I add new posts the page displays nothing. I tried some things:
1) Created a category-30.php, category-31.php, category-32.php templates - nothing displays
3) Installed plugins like "use pattern of the parent category" - nothing.
Once I transform those subcategories into categories the templates work wonderful. It's ok to leave like that, but I want to preserve urls like http://mysite.com/catalog/design/
So that the design remained a subcategory to catalog.
What could be my mistake? Here is a code for category-22.php
<?php get_header(); ?>
<?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
<div id="content">
<div style="width:85%;margin-top:20px;">
<?php include (TEMPLATEPATH . '/3.php'); ?>
<table><tr><td class="catalog"><?php wp_list_categories('include=30,31&title_li='); ?></td><td style="padding-left:30px;" class="catalog"><?php wp_list_categories('include=32,33&title_li='); ?></td></tr></table>
<p>
<p>
<p>
<?php
query_posts($query_string.'&posts_per_page=10');?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="clearfloat">
<div style="padding-top:10px;padding-left:10px;display:block;">
<div class="left"><p><?php $values = get_post_custom_values("Image"); echo $values[0]; ?></div><div style="margin-left:30px;"><?php the_content();?></div>
</div> </div>
<?php endwhile; ?>
<div style="padding-top:20px;padding-left:5px;"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?> </div>
<?php else : ?>
<h2 class="center">Not Found</h2>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
<?php endif; ?>
<p>
<p>
</div>
</div>
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
<?php get_footer(); ?>
Please, help. I have no clue