In der index.php einfach die Kategorie IDs anpassen (so wie im Code beschrieben
). Müsste dann so aussehen (das blau markierte sind Deine IDs):
<div id=”rightcol”>
<?php
// enter the IDs of which categories you want to display
$display_categories = array(11,13,16,15);
foreach ($display_categories as $category) { ?>
<div class=”clearfloat”>
<?php query_posts(”showposts=1&cat=$category”);
$wp_query->is_category = false;
$wp_query->is_archive = false;
$wp_query->is_home = true;
?>
<h3><a href=”<?php echo get_category_link($category);?>”><?php
// name of each category gets printed
single_cat_title(); ?></a></h3>
<?php while (have_posts()) : the_post(); ?>
<?php
// this grabs the image filename
$values = get_post_custom_values(”rightcolimage”);
// this checks to see if an image file exists
if (isset($values[0])) {
?>
<a href=”<?php the_permalink() ?>” rel=”bookmark”
title=”Permanent Link to <?php the_title(); ?>”><img
src=”<?php bloginfo('url'); echo '/'; echo
get_option('upload_path'); echo '/'; $values =
get_post_custom_values(”rightcolimage”); echo $values[0]; ?>” alt=””
/></a>
<?php } ?>
<a href=”<?php the_permalink() ?>” rel=”bookmark” class=”title”><?php
// this is where title of the article gets printed
the_title(); ?></a><br />
<?php the_excerpt() ; ?>
<?php endwhile; ?>
</div>
<?php } ?>
</div><!–END RIGHTCOL–>
Bisschen Vorsicht, falls Du den obigen Code jetzt einfach per Copy&Paste übernehmen willst. Dabei werden Sonderzeichen möglicherweise nicht richtig übernommen und es funktioniert nicht. Besser wird es sein, wenn Du einfach Deine IDs so wie oben gezeigt manuell einträgst.