Hi. I ran into an issue where one of the the_content filters was running on my Content Block. I added the condition get_post_type() == ‘post’ but it didn’t work.
Upon investigation I discovered that the widget method queries the post data but doesn’t set the global $post object leading to improper conditional values in the “the_content” filter.
Here’s an updated version of the method…
Not sure if there is a better way than assigning to the global $post or whether this will have unforeseen consequences in with the shortcode includes…any ideas?
Hari Karam Singh
- The topic ‘[Plugin: Custom Post Widget] Correction for properly invoking the_content()’ is closed to new replies.