Custom Post Widget
[resolved] Can we disable wpautop? (5 posts)

  1. julieblair1979
    Posted 3 years ago #

    Is there a way to keep wpautop from running on the content for the Content Block posts this plugin makes?


  2. julieblair1979
    Posted 3 years ago #

    I accomplished this by changing the the_content to get_the_content in the code.

    This plugin is amazing, BTW. Using this with Widget Logic is super powerful. I love this. I had my own custom post type set up to do what this does in a clumsy way, and found this by accident. Amazing.

    Maybe have a setting to turn wpautop off though? I added a custom field to the Content Block post type to trigger disabling wpautop like I do post-by-post and it wasn't working.

  3. Johan van der Wijk
    Plugin Author

    Posted 3 years ago #

    Hi Julie, I'm not sure what you mean by disabling wpautop. Could you please explain what this does and why you would need this? Many thanks, Johan.

  4. julieblair1979
    Posted 3 years ago #

    the_content puts the post through a filter and adds formatting (p tags and such), even around images, and it was messing up the areas I was using the posts for. get_the_content just pulls it as a string, so there is no HTML added to my post, which aready had my own HTML in it.

  5. Johan van der Wijk
    Plugin Author

    Posted 2 years ago #

    The latest version of the Custom Post Widget plugin now has the option to disable apply_filters on the_content which should solve this issue.

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