• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

List Categories In Order Of Hierarchy

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › List Categories In Order Of Hierarchy

This topic is: resolved

Tagged: category, custom taxonomy, post meta

  • This topic has 3 replies, 2 voices, and was last updated 11 years, 12 months ago by Lauren @ OnceCoupled.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • August 4, 2014 at 10:50 am #117020
    chad1008
    Member

    Hello all!

    I was wondering if anyone had any insight on how to modify post meta to list categories (or custom terms to be more specific) in order of their parent/child relationships - as opposed to a simple alphabetical list.

    Example:

    A pet blog with a post listed under the following categories: "Dogs," "Small Breeds," & "Chihuahua." Dog is the main category. Small Breeds is a child category under Dogs, and Chihuahua is a third level category under Small Breeds.

    The post meta for this would read "Filed Under: Chihuahua, Dogs, Small Breeds." (alphabetical)

    How would I go about listing them based on parent/child relationships? ("Filed Under: Dogs, Small Breeds, Chihuahua")

    Thanks in advance!

    August 4, 2014 at 11:03 am #117023
    Lauren @ OnceCoupled
    Member

    Hey, I'm not sure what your level of WordPress customization is?

    When you call the list of categories (http://codex.wordpress.org/Function_Reference/wp_get_post_categories) you should use the args array to specify your "orderby" as "parent" (http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters).

    To change the post meta, use this function, but skip the shortcodes so you can use the function above:
    http://my.studiopress.com/snippets/entry-footer/#customize


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

    August 4, 2014 at 11:38 am #117030
    chad1008
    Member

    ugh. Let's just say my level of customization is such that I should have known better. 😉

    I seem to have a developed a bad habit of looking so hard at Genesis and it's handy hooks and snippets that I completely overlook basic WordPress functions I've been using for years.

    Thanks Lauren!

    August 4, 2014 at 4:15 pm #117062
    Lauren @ OnceCoupled
    Member

    That's the best part of collaboration, right? We get each other out of our thinking circles!


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘List Categories In Order Of Hierarchy’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble