Shortcodes in text blocks
-
I need to be able to call shortcodes from inside text blocks. To accomplish this I changed this:
// LOAD PLAIN CONTENT if( $plain ) { $content = get_post_field( 'post_content', $id ); if( !isset($atts['stop_detect'])) $content = text_blocks_att_swap( $content, $atts ); return apply_filters( 'text_blocks_shortcode_html', $content, $atts ); }
to this
// LOAD PLAIN CONTENT if( $plain ) { $content = get_post_field( 'post_content', $id ); if( !isset($atts['stop_detect'])) $content = text_blocks_att_swap( $content, $atts ); return apply_filters( 'text_blocks_shortcode_html', do_shortcode($content), $atts ); }
Can this be included in next update? Perhaps even have an option like shortcode=”1″ when calling a text block?
Summary: change $content to do_shortcode($content)
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Shortcodes in text blocks’ is closed to new replies.