Well, there is a script out there. The author claims that it removes the wpautop form individual specific shorcodes. You’ll find it here.
Add this to your functions.php or your plugin like below-
// Here I assumed that you kept the name of the PHP script file same
include "shortcode-wpautop-control.php";
And then call the function ike below-
chiedolabs_shortcode_wpautop_control(
array(
'your_short_code'
)
);
You can also call it like this-
// Create first the array of shortcodes from which you wanna remove `wpautop`
$array_of_shortcodes = [
'1st_shortcode',
'2nd_shortcode',
'3rd_shortcode',
];
// Then pass the array as parameter when you're calling the function
chiedolabs_shortcode_wpautop_control( $array_of_shortcodes );
Please note that, this solution isn’t tested. Test it before going to production.
Related Posts:
- Remove wpautop from shortcode content / remove whitespace in buffering
- wpautop() when shortcode attributes are on new lines break args array
- Why does WP not like my container?
- Is shortcode_unautop() broken?
- Raw output (preventing wpautop)
- Remove empty p-Tags in Shortcode content before non p-Tags
- basic shortcode – Why 1st paragraph not wrapped in p tag, but 2nd is
- Extra paragraph tags in an enclosing shortcode
- WordPress wpautop/shortcode generating invalid markup
- Wrap Shortcodes and wpautop
- Disable wpautop on Shortcode attributes
- Remove some tags from shortcodes output? Trying to fix autop
- Wpautop stops working after get_the_excerpt
- Can I prevent wordpress adding and tags to autoembeds
- How can I remove the wp_autop filter from a shortcode block in a block theme page template (twenty twenty-three)?
- shortcode causes broken paragraph tags
- Using get_option() in JavaScript
- Shortcode empty attribute
- Using wp_editor in shortcode
- Why are you using add_action for shortcode?
- How to get URL param to shortcode?
- Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation
- How to display the site name in a WordPress page, or post
- How can I put a wp_redirect into a shortcode?
- Native “playlist” shortcode random playing… How?
- How to display the names of users from a specific group with a shortcode?
- Shortcode from a widget is wrapped in unwanted element
- shortcode for logo image
- Stop strip_shortcodes() stripping content inside shortcodes
- Using audio shortcode for .mp3 URLs with a query string
- Get multiple shortcode attribute values
- How do i link gallery thumbnails to different url’s using the wp native gallery?
- Why do_shortcode is not executing the shortcode in data-* html attributes?
- How to display some selected user meta data on a specific page with a shortcode?
- Gallery shortcode menu order fix no longer working on WordPress 4.0
- How to save a shortcode in a Gutenberg custom block?
- Some doubts about gallery shortcode in WordPress
- has_shortcode for content added after the content
- Shortcode displays only default attribute values
- Can a shortcode function this way
- Dynamically create shortcodes using add_shortcode and a callback
- Creating a Slider Shortcode Based on Nivo Slider
- Passing attributes to shortcode dynamically
- Stop parsing shortcodes
- What is wrong with this code I have to make a blockquote shortcode
- How can I make a shortcode from this code?
- Meta tags in shortcode
- Adding PHP/HTML code inside page from custom template
- WordPress auto adds p to shortcode parameters
- Why isn’t this youtube shortcode working?
- Gist shortcode is not working
- ShortCode and extra
- How to change page title (from a plugin) in twentytwentyone theme
- WordPress Code Standards and Working $link Parameters In Shortcode
- How to set Contact Form 7 fields default value using shortcode attribute? [closed]
- Display post metadata: “title, category, author, date” with shortcode
- Shortcode not working on static front page
- Call Shortcode inside another Shortcodes callback
- Creating a shortcode in a plugin that includes JS
- Compatibility of MathJax extension and JetPack [closed]
- Shortcode to delete post from front end
- MathJax inside shortcode
- How to parse shortcodes within returned content
- Hook WP_Embed run_shortcode
- How to add class or id to shortcode HTML elements?
- Change WordPress Shortcode added in to post
- Changing the title tag from a shortcode
- Shortcodes attributes defaults
- Get Required Assets (JS, CSS etc) for post using REST API
- shortcode in snippet plugin not work
- AJAX and Shortcode with Parameters
- Detecting embeded video format
- While loop shortcode problem
- Remove ‘p’ tags around shortcodes and ‘img’
- How to prevent shortcode preview from breaking in tinymce editor?
- Execute Closing Shortcode After the_content
- Forcing max-width for image captions
- WordPress Short code with additional parameter
- How to protect parts of my code from TinyMCE modification when switching from text to visual mode?
- WordPress messes up with data attributes in shortcode output
- WordPress post pagination continuous [duplicate]
- custom field value as shortcode parameter
- Slow page Loads When Using Dynamic Coding
- Query to list all galleries under a parent post?
- Adding the username into a URL to redirect to a specific page
- Shortcode Help Needed → attributes
- Unique ID for WordPress shortcodes when used more than once on a page?
- Is the WP audio shortcode still relevant?
- Shortcode not working when I output data from wpdb html table row
- How to avoid one code multiple times instead do that through some function? Shortcode, but I think shortcode is not used in main theme’s core files?
- Get current category and place it in shortcode
- Using shortcodes that wrap around code
- How to scroll to a shortcode-generated anchor
- add post type pram to wp shortcode
- filter custom field with checkboxes and show it with one shortcode
- Shortcode to show author role on the author archive page
- How to add button to WYSIWYG to insert shortcode with params (filled in system popup)?
- Want to call shortcode after every blog post title automatically
- add a meta value to the shortcode twice
- Disable / hide example preview using elementor editor on page with shortcode