[wp-hackers] How To Get Completely Processed Body Of Blog Posts?
elfin at elfden.co.uk
Thu Aug 19 19:26:57 UTC 2010
On 19/08/2010 19:38, Otto wrote:
> On Thu, Aug 19, 2010 at 1:36 PM, Rich Pedley<elfin at elfden.co.uk> wrote:
>> On 19/08/2010 19:01, Otto wrote:
>>> You can skip the setup_postdata(), the global, the reset...
>>> $mypost = get_post(whatever);
>>> $content = apply_filters('the_content', $mypost->post_content);
>>> Note: Badly made plugins that use shortcodes for inappropriate things
>>> will complain at you about doing this. I've seen cases where
>>> processing the_content filter will a) Add items to a cart in a
>>> shopping plugin,
>> I fixed it!
>> well ok I still have a few more things to fix on that side, but I did fix
>> that bit specifically!
> I wasn't naming names, just giving examples. ;)
yeah I know ;)
> Lots of people have made this same sort of mistake. You're not alone.
aye, I dare say it is fairly common. I'm hoping to sort the rest out
soon, they are just slightly more complex, and I need to figure things
out in my head before I start recoding. Plus knee deep in other coding
One day I get it all up to spec...
More information about the wp-hackers