Remove leaking raw shortcodes from Themler excerpts

Stagger Lee
1833 Posts
Stagger Lee posted this 23 April 2015

Theme functions.php or functions.php inside a plugin:

function remove_shortcode_from_excerpt($content) {
$content = strip_shortcodes( $content );
return $content;//always return $content
}
add_filter('the_excerpt', 'remove_shortcode_from_excerpt');
add_filter('get_the_excerpt', 'remove_shortcode_from_excerpt');

It sholud be inside Themler code at default. Excerpts are leaking many raw shortcodes. Specially caption shortcode from inserted images.

Theme functions.php or functions.php inside a plugin: function remove_shortcode_from_excerpt($content) { $content = strip_shortcodes( $content ); return $content;//always return $content } add_filter('the_excerpt', 'remove_shortcode_from_excerpt'); add_filter('get_the_excerpt', 'remove_shortcode_from_excerpt'); It sholud be inside Themler code at default. Excerpts are leaking many raw shortcodes. Specially caption shortcode from inserted images.

Last edited 23 April 2015 by Stagger Lee

Vote to pay developers attention to this features or issue.
7 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 23 April 2015

Hello Stager Lee,
thank you for your suggestion, I passed it to our engineers for review and it will be considered as possible improvement.

regards,
Aileen

Hello Stager Lee, thank you for your suggestion, I passed it to our engineers for review and it will be considered as possible improvement. regards, Aileen
Support Team
Support Team posted this 08 May 2015

Hello

Done.
The improvement will be available in the next update.

Thank you,
Olivia

Hello Done. The improvement will be available in the next update. Thank you, Olivia
Stagger Lee
1833 Posts
Stagger Lee posted this 14 January 2016

You probably changed something in code latest so shortcodes are again visible in excerpts.

You probably changed something in code latest so shortcodes are again visible in excerpts.
Stagger Lee
1833 Posts
Stagger Lee posted this 15 January 2016

theme_get_excerpt doesnt work in same way as WP native the_excerpt.
So statement in topic under is not true.

https://answers.themler.com/questions/30292/other-plugin-shortcode

theme_get_excerpt doesnt work in same way as WP native the_excerpt. So statement in topic under is not true. https://answers.themler.com/questions/30292/other-plugin-shortcode
Stagger Lee
1833 Posts
Stagger Lee posted this 17 January 2016

On one theme I get this in excerpts. If WP gallery is fiirst in Post.

#gallery-1 { margin: auto; } #gallery-1 .gallery-item { float: left; margin-top: 10px; text-align: center; width: 33%; } #gallery-1 img { border: 2px solid #cfcfcf; } #gallery-1 .gallery-caption { margin-left: 0; } /* see gallery_shortcode() in wp-includes/media.php */ Share on Facebook

On one theme I get this in excerpts. If WP gallery is fiirst in Post. #gallery-1 { margin: auto; } #gallery-1 .gallery-item { float: left; margin-top: 10px; text-align: center; width: 33%; } #gallery-1 img { border: 2px solid #cfcfcf; } #gallery-1 .gallery-caption { margin-left: 0; } /* see gallery_shortcode() in wp-includes/media.php */ Share on Facebook
Stagger Lee
1833 Posts
Stagger Lee posted this 17 January 2016

Native WP "the_excerpt" remove shortodes from excerpts. Please fix it, this is not so small problem.

Native WP "the_excerpt" remove shortodes from excerpts. Please fix it, this is not so small problem.

Last edited 17 January 2016 by Stagger Lee

Support Team
Support Team posted this 21 January 2016

Hello Stagger Lee,
I'm passing it to developers for review.
We'll contact you when we receive a response.

regards,
Aileen

Hello Stagger Lee, I'm passing it to developers for review. We'll contact you when we receive a response. regards, Aileen
You must log in or register to leave comments