Developing different page listings for each category?
-
I’m developing a site that I’d like to have different styles of listing different categories. So, my plan is to simply have a statement in entry.php that redirects to the entry file for the proper category.
I’m doing this:
<?php echo 'Home'; if(in_category('people')) { include(TEMPLATEPATH.'/includes/entry-people.php'); } else if(in_category('projects')) { include(TEMPLATEPATH.'/includes/entry-projects.php'); } else if(in_category('blog')) { include(TEMPLATEPATH.'/includes/entry-blog.php'); } else if(in_category('media')) { include(TEMPLATEPATH.'/includes/entry-media.php'); } else if(in_category('news')) { include(TEMPLATEPATH.'/includes/entry-news.php'); } else if(in_category('publications')) { include(TEMPLATEPATH.'/includes/entry-publications.php'); } else { include(TEMPLATEPATH.'/includes/entry-default.php'); } ?>
However, the other pages don’t seem to load. How many things am I doing wrong? I’ve verified that the if statements are correctly triggering for each category, and that the path included in the include statement is indeed the right path to the file.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Developing different page listings for each category?’ is closed to new replies.