WordPress.org

Ready to get started?Download WordPress

Forums

See a category page? (9 posts)

  1. nsusa
    Member
    Posted 9 years ago #

    I would like to be able to display a page with all the categories (no topics) so that users can drill further down to the category they want to go to.

    Is there a way to create a link to "Category" and then have a page just show all categories?

    Chris

  2. Jabbok
    Member
    Posted 9 years ago #

    You can see what I've done, here. I just created a page and placed links to the categories.

  3. samsm
    Member
    Posted 9 years ago #

    If you want to create a list of the categories dynamically, you might alter your theme so that the page you wish to show categories contains:

    <?php wp_list_cats('sort_column=name'); ?>

    As a matter of practicality, if categories do not change often, I think Jobbok's suggestion is quite sound. You might "cheat" by adding the php I've suggested to a theme you are using and them copying and pasting the resulting html into a page. Wouldn't take long at all and the result would actually be easier on your server than generating the list dynamically each time..

  4. patrickc
    Member
    Posted 9 years ago #

    I tried to put a "wp_list_cats" line on one of my pages, and for some reason, the page didn't execute it; the code is visible instead of the category list. This is what I put in the body of the page:
    <h2>< ?php _e('Category-based'); ?></h2>
    <ul>< ?php wp_list_cats('sort_column=name&optioncount=0&exclude=1&hide_empty=0'); ?></ul>

    <h2>< ?php _e('Date-based'); ?></h2>
    <ul>< ?php wp_get_archives('type=monthly'); ?></ul>

    Thoughts? When I try a different "list cats" tag (one that I'm not using in my sidebar as well), the same thing happens.

    You can see what it looks like at:
    http://supercres.net/?page_id=888

  5. ColdForged
    Member
    Posted 9 years ago #

    First, you need the RunPHP plugin. Then you need to turn off the option that tells WordPress to correct invalid nested XHTML.

  6. moshu
    Member
    Posted 9 years ago #

    Your problem is: first you have to create a template (call it "listing" or whatever BUT category!) with the proper tags in it, THEN create a new Page in the Write panel, do not put anything in it, just select your "listing" template for it.

  7. ColdForged
    Member
    Posted 9 years ago #

    Or do what moshu said ;).

  8. Tek
    Member
    Posted 9 years ago #

    How do you make a template?

  9. Tek
    Member
    Posted 9 years ago #

    nevermind

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.