Codex

Function Reference/is term

Contents

Description

Check if Term exists.

Returns the index of a defined term, or 0 (false) if the term doesn't exist.

Usage

<?php is_term$term$taxonomy ?>

Parameters

$term
(integer|string) (required) The term to check
Default: None
$taxonomy
(string) (optional) The taxonomy name to use
Default: ''

Return Values

(mixed) 
Get the term id or Term Object, if exists.

Examples

Notes

  • Uses global: (object) $wpdb
  • Uses global: (object) $term

Change Log

Since: 2.3.0

Source File

is_term() is located in wp-includes/taxonomy.php.

Related

is_home(), is_front_page(), is_search(), is_404(), is_singular(), is_page(), is_attachment(), is_local_attachment(), is_single(), is_sticky(), is_archive(), is_category(), is_tag(), is_author(), is_date(), is_year(), is_month(), is_day(), is_time(), is_admin(), is_preview(), is_paged(), is_page_template(), is plugin active(), is_plugin_page(), is_new_day(), is_feed(), is_trackback(), is_comments_popup(), comments_open(), pings_open(), is_taxonomy(), is_taxonomy_hierarchical(), is_term(), is_user_logged_in(), is_blog_installed(), is_active_sidebar(), is_dynamic_sidebar(), is_active_widget(), in_the_loop(), in_category(), has_tag(), has_excerpt()

is_term, get_term, get_term_by, get_term_children, get_terms, wp_get_object_terms

See also index of Function Reference and index of Template Tags.