111 posts
  • Has referred 1000+ members
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has collected 50+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+5 more
elemis says

Hello again,

Thanks a million for all the suggestions. You’re the best :D

1383 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 10+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
wpCanyonThemes says

function formatter($content) {
    $new_content = '';
    $pattern_full = '{(\[raw\].*?\[/raw\])}is';
    $pattern_contents = '{\[raw\](.*?)\[/raw\]}is';
    $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);
    foreach ($pieces as $piece) {
        if (preg_match($pattern_contents, $piece, $matches)) {
            $new_content .= $matches[1];
        } else {
            $new_content .= wptexturize(wpautop($piece));
        }
    }
    return $new_content;
}
remove_filter('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
add_filter('the_content', 'formatter', 99);

[raw]Content without Paragraphs[/raw]

Dude, this thing has some issues. It doubles my content on shortcodes i use it on. Maybe the forum screwed up the code, post it on that thingy website i can’t remember the name, where you post codes and share it with other people.

Update: @itsmattadams – Tried yours, works perfect. Thanks.

111 posts
  • Has referred 1000+ members
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has collected 50+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+5 more
elemis says

Put this in functions.php.
function remove_wpautop($content) { 
    $content = do_shortcode( shortcode_unautop($content) ); 
    $content = preg_replace( '#^<\/p>|^<br \/>|

$#’, ’’, $content ); return $content; }

Example/Usage:

add_shortcode( 'blockquote', 'blockquote_shortcode' );
function blockquote_shortcode( $attr, $content = null ) {
    $return .= '
’; $return .= remove_wpautop($content); $return .= ‘
’; return $return; }

This really works great, thank you. However when there is a shortcode inside shortcode it breaks. What may be the reason? How can we fix it?

709 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+2 more
ChillThemes says


This really works great, thank you. However when there is a shortcode inside shortcode it breaks. What may be the reason? How can we fix it?

It doesn’t break for me, do_shortcode allows shortcodes to be nested. You could provide more details, but make sure you have closed all shortcodes properly.

111 posts
  • Has referred 1000+ members
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has collected 50+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+5 more
elemis says



This really works great, thank you. However when there is a shortcode inside shortcode it breaks. What may be the reason? How can we fix it?
It doesn’t break for me, do_shortcode allows shortcodes to be nested. You could provide more details, but make sure you have closed all shortcodes properly.

For example when there are columns inside columns it breaks. Or list shortcode inside list shortcode. But if there is a list shortcode inside column shortcode it works without problems.

709 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+2 more
ChillThemes says




This really works great, thank you. However when there is a shortcode inside shortcode it breaks. What may be the reason? How can we fix it?
It doesn’t break for me, do_shortcode allows shortcodes to be nested. You could provide more details, but make sure you have closed all shortcodes properly.
For example when there are columns inside columns it breaks. Or list shortcode inside list shortcode. But if there is a list shortcode inside column shortcode it works without problems.

As far I know, that can’t be fixed.

1383 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 10+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
wpCanyonThemes says

@elemnis – That’s actually a WordPress shortcode system issue. Until they rewrite the system, we can’t use it.

111 posts
  • Has referred 1000+ members
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has collected 50+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+5 more
elemis says

Thanks guys, we appreciate your support.

@wpCanyonThemes, good luck with the sales on your new template. Especially with the tough and rude clients that don’t really know what they need :) that probably will want columns inside columns inside columns inside columns… :)

1383 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 10+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
wpCanyonThemes says

Thanks guys, we appreciate your support. @wpCanyonThemes, good luck with the sales on your new template. Especially with the tough and rude clients that don’t really know what they need :) that probably will want columns inside columns inside columns inside columns… :)

Thanks man, should be up today or tomorrow :) Yeah, i’m already nervous about the support, but it’s normal i think, it’s mostly “Thanks, i’m glad you like it. Thanks for buying.” haha :)

350 posts Gambit
  • Has been part of the Envato Community for over 5 years
  • Has referred 10+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 100+ items on Envato Market
+4 more
bfintal says

Might be a bit late, but I just tested itsmattadams’s solution and so far i’m not having troubles with shortcodes inside shortcodes

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by