Successful in using diff tempalte for cat?
-
Have you (yes, you in the back stop hiding!) been able to achieve this? I’ve read A LOT of information, at times it’s pretty confusing, but I think I know where I am headed with it and how it will (and can) work. But, I have yet to see any working example for all the comments of “it’s workable”.
I’ve got a far as creating one template/style/theme which I have modified five times for give subtly distinct looks. I also need to understand a couple of things:
With the side bar, is it possible to have a plugin that create recent reviews list based on the category? Or in fact customise several elements of the side bar to be unique to that category.
Also how will the header amd sidebar know which files to call? I mean I have style 2 for cat 2, and what I want is for the header to call a different header image, and for the sidebar to call the customised sidebar content (if it’s possible). So do I create seperate headers (header2, header2) and side.php files to match the category, so that the category calls header2.php and sidebar.php instead?
Am I on the right track? This is what I have copied from teh index file, and have made 6 copies for the six categories.
<?php get_header(); ?>
<?php get_sidebar(); ?>
<div id="content"><?php
if ($posts) {
foreach($posts as $post) { start_wp();
?>
<br />
<div class="post">
<a class="title" href="<?php the_permalink() ?>" style="text-decoration:none;" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a>
<div class="cite"><?php the_time("l F dS Y") ?>, <?php the_time() ?> <?php edit_post_link(); ?><br />
<?php _e("Filed under:"); ?> <?php the_category(',') ?></div><?php the_content(); ?>
<div class="commentPos"><?php wp_link_pages(); ?><?php comments_popup_link(__('0 Comments'), __('1 Comment'), __('% Comments')); ?></div>
<br /><div class="sep"></div>
<!--
<?php trackback_rdf(); ?>
--><?php comments_template(); // Get wp-comments.php template ?>
</div>
<?php } // closes printing entries with excluded cats ?><?php } else { ?>
<?php _e('Sorry, no posts matched your criteria.'); ?>
<?php } ?><div class="right"><?php posts_nav_link('','','previous »') ?></div>
<div class="left"><?php posts_nav_link('','« newer ','') ?></div><br /><br />
</div>
<?php get_footer(); ?>
I think I’m on the right track but don’t know where to go next
The topic ‘Successful in using diff tempalte for cat?’ is closed to new replies.