Stripping Shortcodes on Homepage Sections
-
Not sure what the intention of this was – but within the homepage sections you’ve written your own custom content filter, which is stripping out short code support.
A user reported an issue with our plugin, but after some bug hunting we were able to track it back to your theme – and a few functions you have written to generate the content on the front end (specifically on the homepage).
I’m not sure if this is a marketing ploy to try and upsell users to a pro vesion, or if you really just don’t want users to enter shortcodes on the homepage – but it seems to be causing some issues where users can not parse shortcodes inside of the WordPress editor of the homepage theme options sections.
Offending Function:
skt_white_the_content_format( $content );
Additional helper functions:
// get_the_content format text function skt_white_get_the_content_format( $str ){ $raw_content = apply_filters( 'skt_white_the_content', $str ); $content = str_replace( ']]>', ']]>', $raw_content ); return $content; } // the_content format text function skt_white_the_content_format( $str ){ echo skt_white_get_the_content_format( $str ); }
If anyone else comes across this and is looking to provide shortcode support inside of the homepage content areas, simply alter
skt_white_get_the_content_format()
to the following:// get_the_content format text function skt_white_get_the_content_format( $str ){ return apply_filters( 'skt_white_the_content', $str ); }
Inside of
functions.php
, around line #236.Pro Tip: Before you buy any theme, I would do some form of code audit (or at least research the author) – to ensure what you are paying for is up to date with the latest code standards and secure.
Evan
- The topic ‘Stripping Shortcodes on Homepage Sections’ is closed to new replies.