Get ID Term from Value
-
I have a custom taxonomy set up like so:
register_taxonomy( 'locations', 'franchisee', array( 'label' => __( 'Locations' ), 'sort' => true, 'args' => array( 'orderby' => 'term_order' ), 'rewrite' => array( 'slug' => 'location' ) ) );
I then have several posts with ‘Chester’ applied as a location.
What I’m trying to do however, is to get the ID of the term ‘Chester’ using only the value ‘Chester’, if that makes sense.
I’ve read up on the
get_term_by()
function however cannot see anything relating to my issue in particular
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Get ID Term from Value’ is closed to new replies.