I am building a word press plugin and I need to get back the page and post content as an html string. I want it back as a string so that I can search the DOM for particular elements with a tag and then do something with those elements when found.
The problem is when I use
the_content();
or
$content = apply_filters('the_content', $the_content());
It seems to always display (render) the content on my plugin page which is not what I want. I just want the output back as a string.