Support » Fixing WordPress » want to list posts and categories at index page

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m working on something similar … will reply once I get it 🙂

    Well, you will see on mores.cc that I have a similar setup now.

    My code for the little category-boxes at the bottom (I removed the “unimportant” stuff like my categoy names and the header images):

    <div id="col_0">
    	<div id="col_headline">Kategorie: Privat</div>
    	<?php query_posts('category_name=cat1&showposts=5'); ?>
    	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    		<div id="col_post"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
    	<?php endwhile; else: ?>Oops!
    <?php endif; ?>
    </div>
    
    <div id="col_1">
    	<div id="col_headline">Kategorie: Food</div>
    	<?php query_posts('category_name=cat2&showposts=5'); ?>
    	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    		<div id="col_post"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
    	<?php endwhile; else: ?>Oops!
    <?php endif; ?>
    </div>
    
    <div id="col_0">
    	<div id="col_headline">Kategorie: Privat</div>
    	<?php query_posts('category_name=cat3&showposts=5'); ?>
    	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    		<div id="col_post"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
    	<?php endwhile; else: ?>Oops!
    <?php endif; ?>
    </div>
    
    <div id="col_1">
    	<div id="col_headline">Kategorie: Food</div>
    	<?php query_posts('category_name=cat4&showposts=5'); ?>
    	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    		<div id="col_post"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
    	<?php endwhile; else: ?>Oops!
    <?php endif; ?>
    </div>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘want to list posts and categories at index page’ is closed to new replies.