the_content
loop-contentFilters post content before display
the_content is the last chance to change post HTML before it reaches the template. Always return the string — filters that echo will break the page.
Signature
apply_filters( 'the_content', string $content );Example
add_filter( 'the_content', function( $content ) {
if ( is_single() ) {
$content .= '<p><strong>Thanks for reading!</strong></p>';
}
return $content;
} );Common Use Cases
- Append/prepend content to posts
- Transform shortcodes manually
- Add schema markup to content
- Strip or sanitize specific HTML





![excerpt_more WordPress filter hook — Filters the '[...]' string appended to auto-generated excerpts — excerpt_more only changes the trailing string on auto-generated excerpts — it does nothing to a manually written excerpt…](https://4wp.dev/wp-content/uploads/2026/09/4wpdev-hooks-filters-excerpt_more.png)





![render_block WordPress filter hook — Filters the final HTML output of every rendered block — render_block runs for every block on the page, core and custom alike — check $block['blockName'] or it will touch conten…](https://4wp.dev/wp-content/uploads/2026/09/4wpdev-hooks-filters-render_block.png)