-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
If we use a custom queryposts in a template, it disable Visual Composer shortcodes_custom_css injection
Until we find a better solution we nned to add this to function.php
add_action('wp_head', array( $this, 'rand654_add_css') );
function rand654_add_css() {
if ( ! is_singular() ) {
$id = get_the_ID(); // here you should change id to ID, of your post/page in loop
if ( $id ) {
$shortcodes_custom_css = get_post_meta( $id, '_wpb_shortcodes_custom_css', true );
if ( ! empty( $shortcodes_custom_css ) ) {
echo '<style type="text/css" data-type="vc_shortcodes-custom-css-'.$id.'">';
echo $shortcodes_custom_css;
echo '</style>';
}
}
}
}Reactions are currently unavailable