Skip to content

Display WordPress the_content() using a variable

Issue Description

This isn’t really an issue, as such, it’s just a helpful way to display a page’s content via a variable.

The usual approach to displaying content would be:

the_content();

There’s also:

get_the_content();

or:

content('50');

Affected Browsers

Issue Type

How to Fix the Issue

To pass the_content(); through using a variable, use this handy little snippet:

$strip_content	= apply_filters('the_content', get_the_content());

Back to Issues List