WordPress.org

Ready to get started?Download WordPress

Forums

How to automatically link to parent and child categories separately? (1 post)

  1. spawklz
    Member
    Posted 1 year ago #

    I've traversing the net for a solution to this, but I simply cannot seem to get there.

    I use the (top) categories for page titles, and the various pages only display posts from their respective categories. I'd like to - on single post pages have child categories listed and clickable beneath the (top category) title, and on archive pages have the child categories listed underneath the post title:

    single.php:

    [h2](TOP CATEGORY TITLE)
    [h3](CHILD CATEGORIES)
    (POST TITLE, etc.)

    category.php:

    [h2](TOP CATEGORY TITLE)
    (POST TITLE)
    [h3](CHILD CATEGORIES)
    (POST + METADATA, etc.)

    I can't understand why this should be so difficult. Granted, I'm a complete noob with PHP, but it doesn't seem too infeasible to me...?

Topic Closed

This topic has been closed to new replies.

About this Topic