WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Categories: still No categories (10 posts)

  1. Eline
    Member
    Posted 9 years ago #

    I have added several categories and still nothing shows up on the main page?

  2. URL please

  3. Eline
    Member
    Posted 9 years ago #

  4. Lorelle
    Member
    Posted 9 years ago #

    Do any of the categories have posts in them? Ah, looking at your site, you have no posts PERIOD.

    You have to have posts in your categories in order to see them. No posts, no categories.

  5. tomhanna
    Member
    Posted 9 years ago #

    You can force it to display empty categories by changing the hide_empty option to False using the list_cats or wp_list_cats Template Tags.

    http://codex.wordpress.org/Template_Tags/list_cats
    http://codex.wordpress.org/Template_Tags/wp_list_cats

  6. KimJiWoong
    Member
    Posted 9 years ago #

    which file is list_cats function in?

  7. roterhund
    Member
    Posted 9 years ago #

    Depends on the Theme you're using. For the default Theme, it's in the sidebar (one call to the function is anyway, maybe there's more).
    Look for <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
    If you want empty categories to show, change that to
    <?php wp_list_cats('hide_empty=0&sort_column=name&optioncount=1&hierarchical=0'); ?>

  8. KimJiWoong
    Member
    Posted 9 years ago #

    in "sidebar" file of wp_admin folder, there isn't "wp_list_cats" function

  9. RichH
    Member
    Posted 9 years ago #

    Do you have any apostrophies in the category title? I recently found that Jack's Blog wouldn't work... that list_cats() just fails to output anything.

    If that's your problem, replace the ' with

    Be sure to include all the punctuation, including the semi-colon at the end.

    I found that Jack’s Blog works, and displays as "Jack's Blog."

  10. RichH
    Member
    Posted 9 years ago #

    Well, the code in backticks here doesn't work either. So, I'll try this:

    Replace the ' with & # 8 2 1 7 ; but remove the spaces.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.