Ready to get started?Download WordPress


Display List of subcategories and links on category.php (5 posts)

  1. gilescarey
    Posted 4 years ago #


    I am looking to do something which I thought was quite simple. I am looking to basically have the visitor visit a category page.

    If there are subcategories to the category they are looking at, then a list of links to the relevant subcategory pages should be displayed.

    If not, then nothing needs to done, just show all posts under that category - surely that shouldn't be so hard!

    Thanks in advance.

  2. MichaelH
    Posted 4 years ago #

    Not hard at all. Use the $cat = get_query_var('cat'); to get the current category, then use the template tag, wp_list_categories(), with the child_of argument.

  3. leckley
    Posted 4 years ago #


    Would you be able to give a little more info on how to accomplish this? Not a programmer here, thanks!

  4. pickledlove
    Posted 4 years ago #

    leckley, did you ever get this figured out? I have the same question.

  5. jenscento
    Posted 3 years ago #

    Did anyone get this working?

Topic Closed

This topic has been closed to new replies.

About this Topic