• nsusa

    (@nsusa)


    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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Jabbok

    (@jabbok)

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

    samsm

    (@samsm)

    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..

    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:
    https://supercres.net/?page_id=888

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

    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.

    Or do what moshu said ;).

    How do you make a template?

    nevermind

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘See a category page?’ is closed to new replies.