Check To See if a WordPress Post Has a Term

If The Post Has a Term…

Before actually looking at code for how to do this, I think it’s helpful to outline what it is that we’re actually going to do:

  1. We’re going to load up all of the terms that exist for a given post type
  2. For each term, we’ll determine if the term has a child
  3. If the post has a child, we need to determine if the term is actively applied to the post
  4. If the term if applied to the post, we’ll store it in one index of an array
  5. Otherwise, we’ll store it in a different index of the array

To find out more about this continue reading here!

Leave a Reply

Your email address will not be published. Required fields are marked *

Faceebook

ManageWp
Toronto WordPress Web Design - NYTO Group

Check To See if a WordPress Post Has a Term

by Tina time to read: <1 min
0