Ready to get started?Download WordPress


how to list parent and child category on archive page (1 post)

  1. juliageek
    Posted 6 years ago #


    I would like to list my categories as follows:

    <h1>'parent category'</h1>
    <h2>child category</h2>

    then list posts and excerpts.

    when in the parent category I would like to list thus:

    <h1>Parent category</h1>

    My problem is that I can get the first, but then the second lists thus:

    <h1>'parent category'</h1>
    <h2>parent category</h2>

    Is there a way of losing that second line when in a top level category?


Topic Closed

This topic has been closed to new replies.

About this Topic