the_excerpt_embed() WordPress Function
The the_excerpt_embed() function allows you to embed an excerpt of a post or page in another post or page. This is useful if you want to include a summary of another post on your website. To use this function, simply add the following code to the post or page where you want the excerpt to appear: [the_excerpt_embed] You can also specify the post or page ID of the post or page you want to embed the excerpt from. For example, if the ID of the post you want to embed the excerpt from is 123, you would use the following code: [the_excerpt_embed id="123"] The the_excerpt_embed() function can be used in conjunction with the_excerpt() function to display the excerpt on its own. Simply use the following code: [the_excerpt_embed] [the_excerpt]
the_excerpt_embed() #
Displays the post excerpt for the embed template.
Description
Intended to be used in ‘The Loop’.
Source
File: wp-includes/embed.php
function the_excerpt_embed() { $output = get_the_excerpt(); /** * Filters the post excerpt for the embed template. * * @since 4.4.0 * * @param string $output The current post excerpt. */ echo apply_filters( 'the_excerpt_embed', $output ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |