I wish to display publish game titles arranged by category as a result in WordPress:

Category: Apples - Publish Title One - Publish Title Two - Publish Title ....

Category: Oranges - Publish Title One - Publish Title Two - Publish Title ....

I want the code to do this, not really a wordpress plugin or category widget.

This is comparable to developing a "Archive by Category Page" and can be achieved using the following code:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <h2><?php the_title(); ?></h2>
        <div class="entry">
            <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>

            <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>

    <?php endwhile; endif; ?>

    <!-- Category Archive Start -->
    <ul class="catArchive">
    $catQuery = $wpdb->get_results("SELECT * FROM $wpdb->terms AS wterms INNER JOIN $wpdb->term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id ) WHERE wtaxonomy.taxonomy = 'category' AND wtaxonomy.parent = 0 AND wtaxonomy.count > 0");

    $catCounter = 0;

    foreach ($catQuery as $category) {


        $catStyle = '';
        if (is_int($catCounter / 2)) $catStyle = ' class="catAlt"';

        $catLink = get_category_link($category->term_id);

        echo '<li'.$catStyle.'><h3><a href="'.$catLink.'" title="'.$category->name.'">'.$category->name.'</a></h3>';
            echo '<ul>';


            <?php while (have_posts()) : the_post(); ?>
                <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
            <?php endwhile; ?>

                <li><a href="<?php echo $catLink; ?>" title="<?php echo $category->name; ?>">More <strong><?php echo $category->name; ?></strong></a></li>
        <?php } ?>
    <!-- Category Archive End -->

Observe that the code above is only going to display groups which have posts connected together, otherwise they'll be missed.

Also, it'll only show the final 5 posts under each category. You are able to change that by changing the amount following the showposts variable. For instance, you can change:


to 1 in which you displayed 10 posts:


Substitute the road above in to the loop in the beginning and you ought to possess a functioning "Archive by Category" page.