do_shortcode() for KC content Join KC discussion

Since ver 2.5 You create custom post-type such as megamenu, footer..etc by the KingComposer page builder and want it displayed inside a specific page. But it will not work correctly when you use method do_shortcode() to display. The method kc_do_shortcode() will help you do it.


What is raw_content?

If you use the KC to build your content on custom post-type, you must get the raw content to process. It's shortcodes format such as [kc_row id="12345"][kc_column][/kc_column][/kc_row]

global $post;

if (function_exists('kc_do_shortcode'))
    $raw_content = kc_raw_content( $post->ID );
    echo kc_do_shortcode( $raw_content );
    // Use default method if KC is deactived
    echo do_shortcode ($post->post_content);