Get a WordPress Category ID

I struggled bus’d pretty hard on this one today. I needed to ignore the “featured” category in a loop, and to do so, WP_Query() requires the category ID. Luckily, I found get_term_by();

 

Author: Greg Rickaby

Greg is a Lead Front-End Developer at WebDevStudios and author of a children's book titled, Creating a Website for Dummies Jr. Thanks for stopping by my blog!

1 thought on “Get a WordPress Category ID”

Leave a Reply