WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Category list and sub-categories in Classic 1.5 Theme (3 posts)

  1. ed800uk
    Member
    Posted 7 years ago #

    Is there a simple way to force Classic 1.5 to list subcategories, even when there are no Posts in parent categories?

    (There are posts in the sub-category. We are inviting posts in the parent category, but we have none yet.)

    It would be better for us if all categories were always listed even when there are no posts.

  2. moshu
    Member
    Posted 7 years ago #

    If you open the sidebar.php for edit you will see this line used to display your categories:
    <?php wp_list_cats(); ?>
    (around line 10)

    Now, knowing this is a template tag, you can always go the the Codex: http://codex.wordpress.org/Template_Tags
    then you find the Category section:
    http://codex.wordpress.org/Template_Tags#Category_tags
    and from there your tag:
    http://codex.wordpress.org/Template_Tags/wp_list_cats
    Now you just have to go through the parameters (hint: hide_empty) and set them as you want.
    Save the file, upload via FTP.
    You are done :)

  3. ed800uk
    Member
    Posted 7 years ago #

    moshu, many thanks, with a strange sort of satisfaction to have it looking the way I want without knowing how it works ;-)

Topic Closed

This topic has been closed to new replies.

About this Topic