• Intro

    I just started using WP and am very bothered by the auto-formatting of my posts. I wanted to make a post demonstrating some jQuery techniques but I couldn’t get the code to execute in my post. I also couldn’t find a good way to remove the auto-formatting for just a section of my post. The inline-javascript plugin seemed to work but it messed up existing posts that were using the SyntaxHighlighter Evolved plugin to display sourcecode.

    So I wrote this plugin to try and solve the problem. As far as I can tell it works, but I’ve never written a wordpress plugin before so I would LOVE any feedback.

    Some specific questions I have…

    • Can you find any problems with my code?
    • Is there already a plugin that does this better? (If so what is it)
    • Is this useful to anyone else? (If so should I submit it to the plugin directory?)

    Plugin Info

    WP-Raw can be downloaded here (if people actually start using it I’ll make a proper home for it)

    To use the plugin just wrap whatever text you don’t want wpautop() and wptexturize() applied to in a [raw] shortcode, like [raw]this[/raw].

    Note: There’s a real-world example in the docs.txt in the download.

    [ Moderator Note: Using a raw shortcode or shortcodes that remove auto formatting will cause plugin incompatibility and prevent you from using any other shortcodes. See https://theandystratton.com/2011/shortcode-autoformatting-html-with-paragraphs-and-line-breaks for more information. ]

Viewing 7 replies - 1 through 7 (of 7 total)
  • LOVE IT! I’ve been looking for a way to disable wpautop on single pages. I’m sure there’s a plugin that allows you to do it with custom fields, but haven’t found it yet. While I want it on a whole page, I can see the benefit of just part of a page or post.

    Wow, talk about savin’ my rear! Thanks so much for this plugin…there’s another one that I tried, and it caused conflicts because it disabled wpautop() everywhere.

    Man, it looks like it’s working right now…hope it stays that way through WP Updates and such. Talk about literally the most annoying aspect of WP for me! Such a simple little thing…so many hours of pain!

    Want a couple bucks?

    Best,
    Dainis

    This doesn’t appear to be working for me but i LOVE the idea. I’m trying to use it within pages, though, and maybe that doesn’t work.

    Joe

    (@morehawes)

    This is EXACTLY what I needed, you saved me alot of time here. Thanks alot! ??

    Joe.

    Wow this does seem like exactly what I need too. I put ads in some of my posts but if I use the WP Visual editor tab, it mangles and destroys the HTML. I assume using this plugin will totally solve my problem?

    Are there any risks with using this on WP 2.8.4? A v0.1 plugin that modifies my the_content is a little risky – just looking for a little reassurance before I inject this into my production site.. Thanks.

    Perfect! I’m successfully using it on WP v 2.9.2.

    -Matt

    I suggest promoting to full-fledged plugin status. Working for me with WP 2.9.1

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Plugin: Remove wpautop, wptexturize with a shortcode’ is closed to new replies.