Cached version of term_exists()

Term exists calls can pile up on a single pageload. This function adds a layer of caching to prevent lots of queries.


Name Type Description
$term int|string The term to check can be id, slug or name.
$taxonomy string The taxonomy name to use
$parent int Optional. ID of parent term under which to confine the exists search.

Return Value

mixed: Returns null if the term does not exist. Returns the term ID if no taxonomy is specified and the term ID exists. Returns an array of the term ID and the term taxonomy ID the taxonomy is specified and the pairing exists.

Ready to get started?

Drop us a note.

No matter where you are in the planning process, we’re happy to help, and we’re actual humans here on the other side of the form. 👋 We’re here to discuss your challenges and plans, evaluate your existing resources or a potential partner, or even make some initial recommendations. And, of course, we’re here to help any time you’re in the market for some robust WordPress awesomeness.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.