Custom Post Widget
[resolved] 'Do not apply content filters' when using shortcodes (4 posts)

  1. heytricia
    Posted 3 years ago #

    First let me say I love love love your plugin! It's a major part of my builds. I know you must get sooo tired of questions about things being added to posts... so I apologize for yet another.

    I use the 'Do not apply content filters' checkbox in most cases. But sometimes I add a content block via shortcode and run into problems. Is there a way to add this command within the shortcode?

    Thanks much!


  2. Johan van der Wijk
    Plugin Author

    Posted 3 years ago #

    Hi, I have created a beta version of the plugin in which you can disable the content filter when using the shortcode.

    Use the parameter apply_content_filters for setting this. Example:
    [content_block id=196 apply_content_filters=false]

    You can test this by replacing the file post-widget.php in your /wp-content/plugins/custom-post-widget/ folder by the following: http://pastebin.com/4y10NBU8

    Please me know if this works so I can add this to the next plugin version release.

  3. heytricia
    Posted 3 years ago #

    Unfortunately, it did not work....

  4. Johan van der Wijk
    Plugin Author

    Posted 3 years ago #

    Sorry for the late reply, unfortunately it seems it is not so easy as I thought to remove the apply_content_filters from a shortcode. I have found this thread about it on Stack Overflow and it seems to be necessary to add some code to your functions.php file:


    Let me know if that doesn't work.

    P.s. of course it is always better not to inject additional content to posts without allowing to specify when to do this (see the 4th point in the faq: http://wordpress.org/plugins/custom-post-widget/faq/ )

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic