Category.php isn't working
-
Hi !
I’m working on a customized theme which involves the WordPress blog system (articles, categories, pages, etc.) + the plugin WP Ecommerce.
http://ricochet-livres-jeunesse.fr
You will see category “Auteurs et illustrateurs” with articles regarding authors and illustrators, an other category “Animations”, etc. etc.
I created a category.php with this code :<?php $post = $wp_query->post; if (in_category('auteurs-illustrateurs')) { include(TEMPLATEPATH.'/category-auteurs.php'); } elseif (in_category('test')) { include(TEMPLATEPATH.'/category-default.php'); } else{ include(TEMPLATEPATH.'/category-default.php'); } ?>
So the specific category “auteurs-illustrateurs” has a specific category-auteurs.php
Everything was working well until today, as I realized that all my categories pages are not working ! For example, when you go on this page http://ricochet-livres-jeunesse.fr/auteurs-illustrateurs/ you will indeed see a list of the articles, but presented as if they were page.php !
<h1> Gaspard Clarence </h1> <div class="contenu"> </div> <h1> Edgar Poux </h1> <div class="contenu"> </div> <h1> Daniel Lorant </h1> <div class="contenu"> </div>
Indeed, I deleted the page.php template and it stopped showing the category page as a multiple page.php.
However, the “Auteurs & illustrateurs” pages showed as the category-default.php template, and not as the category-auteurs.php. Plus, if I upload again page.php it’s making the problem I explained above…To sum up, there’s some kind of conflict between my templates page.php, category.php and the customized category.php !
// Solved : it was because of the Wp Ecommerce plugin, I deleted the shortcode [productspage] on the Products Page …
- The topic ‘Category.php isn't working’ is closed to new replies.