WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. gilescarey
    Member
    Posted 4 years ago #

    Hi

    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
    Member
    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
    Member
    Posted 4 years ago #

    Hi,

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

  4. pickledlove
    Member
    Posted 4 years ago #

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

  5. jenscento
    Member
    Posted 4 years ago #

    Did anyone get this working?

Topic Closed

This topic has been closed to new replies.

About this Topic