WordPress.org

Support

Support » How-To and Troubleshooting » how to list parent and child category on archive page

how to list parent and child category on archive page

  • Hi.

    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?

    Thanks

  • The topic ‘how to list parent and child category on archive page’ is closed to new replies.
Skip to toolbar