0

We're using WordPress to maintain data for a site that gets feed into a JSON file.

I've noticed that the post content we add to our file is not getting formatted appropriately. So when we feed it to our other website, the post content has no HTML, like paragraph tags.

I know that get_the_content runs the content through the WordPress filter to add all the correct HTML formatting. However, since we are making direct calls to the database in a custom script, we're just getting the raw post content.

What would we need to do in order to run our content through the WordPress content filter while our script is not connected to WordPress?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.