Display one Subcategory (1 post)

  1. justintylermoore
    Posted 4 years ago #

    Hello friends!

    I have a site with several categories. Also those cats have subcategories.

    I am trying to find a way to display only the subcategory of a certain category.

    for example, I have these category and sub-cats

    -----North Carolina
    -----New Mexico

    On each post there is a state area that I used to call via a custom field. However, I was choosing the states category and also manually entering it in a custom field. I am trying to find a way to cut down on my use of custom fields, and by returning the value of the subcategory of the post, I should be able to just return the value of the states category.

    I have tried the post_is_in_descendant_category function, but that keeps returning a list of all the subcategories filed under west, east, etc...

    I need help! Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 4 years ago by justintylermoore
  • This topic is not resolved
  • WordPress version: 3.0.1


No tags yet.