Title: wp_term_is_shared
Published: December 9, 2015
Last modified: February 24, 2026

---

# wp_term_is_shared( int $term_id ): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#wp--skip-link--target)

Determines whether a term is shared between multiple taxonomies.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#description)󠁿

Shared taxonomy terms began to be split in 4.3, but failed cron tasks or other delays
in upgrade routines may cause shared terms to remain.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#parameters)󠁿

 `$term_id`intrequired

Term ID.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#return)󠁿

 bool Returns false if a term is not shared between multiple taxonomies or if splitting
shared taxonomy terms is finished.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#source)󠁿

    ```php
    function wp_term_is_shared( $term_id ) {
    	global $wpdb;

    	if ( get_option( 'finished_splitting_shared_terms' ) ) {
    		return false;
    	}

    	$tt_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_taxonomy WHERE term_id = %d", $term_id ) );

    	return $tt_count > 1;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/taxonomy.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/taxonomy.php#L4643)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/taxonomy.php#L4643-L4653)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#related)󠁿

| Uses | Description | 
| [get_option()](https://developer.wordpress.org/reference/functions/get_option/)`wp-includes/option.php` |

Retrieves an option value based on an option name.

  | 
| [wpdb::get_var()](https://developer.wordpress.org/reference/classes/wpdb/get_var/)`wp-includes/class-wpdb.php` |

Retrieves one value from the database.

  | 
| [wpdb::prepare()](https://developer.wordpress.org/reference/classes/wpdb/prepare/)`wp-includes/class-wpdb.php` |

Prepares a SQL query for safe execution.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#)

| Used by | Description | 
| [add_term_meta()](https://developer.wordpress.org/reference/functions/add_term_meta/)`wp-includes/taxonomy.php` |

Adds metadata to a term.

  | 
| [update_term_meta()](https://developer.wordpress.org/reference/functions/update_term_meta/)`wp-includes/taxonomy.php` |

Updates term metadata.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_term_is_shared/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.4.0](https://developer.wordpress.org/reference/since/4.4.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_term_is_shared%2F)
before being able to contribute a note or feedback.