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

---

# is_embed(): bool

## In this article

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

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

Is the query for an embedded post?

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

 bool Whether the query is for an embedded post.

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

    ```php
    function is_embed() {
    	global $wp_query;

    	if ( ! isset( $wp_query ) ) {
    		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    		return false;
    	}

    	return $wp_query->is_embed();
    }
    ```

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

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

| Uses | Description | 
| [WP_Query::is_embed()](https://developer.wordpress.org/reference/classes/wp_query/is_embed/)`wp-includes/class-wp-query.php` |

Determines whether the query is for an embedded post.

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

Retrieves the translation of $text.

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

Marks something as being incorrectly called.

  |

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

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

Adds the hooks needed for CSS output to be delayed until after the content of the page has been established.

  | 
| [wp_robots_noindex_embeds()](https://developer.wordpress.org/reference/functions/wp_robots_noindex_embeds/)`wp-includes/robots-template.php` |

Adds `noindex` to the robots meta tag for embeds.

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

Filters the string in the ‘more’ link displayed after a trimmed excerpt.

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

Redirect old slugs to the correct permalink.

  | 
| [is_admin_bar_showing()](https://developer.wordpress.org/reference/functions/is_admin_bar_showing/)`wp-includes/admin-bar.php` |

Determines whether the admin bar should be showing.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/is_embed/?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%2Fis_embed%2F)
before being able to contribute a note or feedback.