'wordpress shortcodes show up in preview posts

http://www.mytwins.gr/site/

In the third blog post you will see that a shortcode shows up [frame align="none"]Της Εύης Σταθάτου[/frame] which is ugly. Only if you click it, it works fine.

Why is that?, How can you hide the code from the previews posts thingy? Thanks in advance.

P.S I tried to hide the shortcode from the visual mode and enter it in the text mode, but still the same.



Solution 1:[1]

As @Ravi suggests, make sure that your plugins are enabled. However, it looks like your shortcodes are appearing within your excerpts (assuming you're using the_excerpt() for the snippets appearing on your homepage?)

I would suggest a handy snippet of RegEx:

$myExcerpt = get_the_excerpt();
$myExcerpt = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $myExcerpt);
echo $myExcerpt;

That should stop the raw shortcodes from appearing.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 indextwo