I’ve tried that, can’t find any thing specifically saying the home page. Can you please point out what I may be missing?
Thank you very much for any help.
Do want the category display to be different? Or the display of posts in this category to be different on your front page? They’re two very different things…
I am only referring to the front page. I would like all posts in one category to display differently then the others.
codex.wordpress.org/Category_Templates
wrote:
So, if you want to make the Category whose ID number is 6 look different from what it is currently (and different from other Category pages), you would want to create a category-6.php file.
————-
So, what should I write in this file?
codex.wordpress.org/Category_Templates
wrote:
If you want to make all Category pages look different from other archive pages (such as date and author archives), then you would want to create or modify the category.php file.
————–
How to modify ?
you can use the if argument:
<?php
if ( in_category(‘fruit’) ) {
include ‘single-fruit.php’;
} elseif ( in_category(‘vegetables’) ) {
include ‘single-vegetables.php’;
} else {
// Continue with normal Loop
if ( have_posts() ) : while ( have_posts() ) : the_post();
// …
}
?>
(http://codex.wordpress.org/Function_Reference/in_category)
I’ve done it for a site and used this:
<?php if ( in_category( array( 6,7,8 ) ) ) : ?>
<div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<div class=”projectlink”>
<?php if (in_category (6)): ?> Show this text in category 6
<?php elseif (in_category (7)): ?> Show this text in category 7
<?php elseif (in_category (8)): ?> Show this text in category 8
<?php endif; ?>
<h2 class=”entry-title”><?php the_title(); ?></h2>
<?php the_content( ); ?>
<?php endif; ?>
</div><!– projectlink –>
</div><!– post –>
Or maybe this is what you want; query_posts
For example if you want to show the category number 4: query_posts(‘cat=4’);
Put this before starting the loop. End the loop and run the loop again for the rest of your posts.
(http://codex.wordpress.org/Function_Reference/query_posts)