WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] don't show Subcategories (4 posts)

  1. silviamato
    Member
    Posted 4 years ago #

    Hi!
    I've a blog with many categories and subcategories. How can I show only the 'mother' category in the sidebar?
    I can do it?
    And how can I do a page where I can show all moder and child categories?

  2. MichaelH
    Member
    Posted 4 years ago #

    The template tag, wp_list_categories(), has a depth=1 argument to show only 'top level' categories.

    You could also use wp_list_categories() in a Page Template to display all categories in a Page.

    Related:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

  3. silviamato
    Member
    Posted 4 years ago #

    Thanks!

  4. thelaw
    Member
    Posted 4 years ago #

    Is there a way we can get posts to use permalinks that only use the categories and not the subcategories? Categories only in the sidebar is a simple codex function.

Topic Closed

This topic has been closed to new replies.

About this Topic