Theme requires stripped down shortcodes. How to keep certain shortcode visible?
-
Hello,
I use a theme which strips down all shortcodes from ‘single portflio’ pages (posts), yet it uses gallery id shortcode to turn the gallery into a slider (if entered into post).
When I put additional (in this case Ninja Form plugin) shortcode into the post, it will ignore it, because it strips shortcodes out. Only the image slider will be shown.I need to target one specific page (post) to filter Ninja Form’s shortcode to display, while keeping all the other shortcodes stripped down according to the theme’s requisites.
The theme’s function.php is:
function remove_shortcode_from_index($content) { if ( is_singular('portfolio') ) { $content = strip_shortcodes( $content ); } return $content; } add_filter('the_content', 'remove_shortcode_from_index');
Thank you kindly for any advice in the right direction.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Theme requires stripped down shortcodes. How to keep certain shortcode visible?’ is closed to new replies.