Viewing 2 replies - 1 through 2 (of 2 total)
  • I spent a few hours trying to figure this out myself today. Search the forums, found multiple posts asking the same question, but no answers. Finally, I just buckled down, and figured it out myself.

    Easiest way I could come up with, was to create a custom page template. I called mine catpage.php. Looked something like this:

    <?php
    /*
    Template Name: catpage
    */
    
    get_header(); ?>
    
    <h2><?php _e('Categories'); ?></h2>
    		<ul>
    			<?php wp_list_cats(); ?>
    
    <?php get_footer(); ?>

    once that was done, I went into my dashboard, and created a new page. I left it blank, and told it to use the template “catpage’.
    From there, it was a simple matter of putting a link to that page (in my case, http://www.cowboys4god.com/?page_id=238) into the sidebar (you could of course put it anywhere you wanted.

    I also chose to then open my style.css sheet, and define a catpage class, so that I could adjust how the template page looked by adding the <div class=”catpage”> tag into the template.

    There may be an easier way to do this, but this is how I did it, and it worked quite well. I now have a ‘Categories’ page, which lists the categories, as well as the number of posts within each. You can of course use any of the arguments for the wp_list_cats() tag.

    Hope this helps.

    quick update, as I’ve noticed a few hits on the site from here. The link I used got changed. So when clicking on that, peopel are getting a blank page. Here is the actual page that the Categories list is on. Sorry for any confusion.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Categories on a page’ is closed to new replies.