How to get the_content with all HTML tags inside functions.php?

preview_player
Показать описание


Transcript:

I’m working on a local environment and the set up is Trellis and Bedrock which basically means a Vagrant Box. For a starter theme, I’m using Underscores.

OK let's get to it!

Adding our snippet… You can find a link to the article in the description.
...and return the variable

Works every time.

The TL;DR here is that the post_content field returns the same result as get_the_content function. I’m using the field because there is a WordPress bug when using PHP 7.2 and the_content or get_the_content.

I will drop a link in the description if you want to know more about that bug.

Well, I think this was all for this video.

Have a great one!
Рекомендации по теме