3
votes

We have found that visual composer is creating custom css class and css code is placed in:

<head>...</head>

We have shortcodes which generate some css code. we also want to make a custom css class and add the css code with the custom css class name.

We just want to make like this.

enter image description here http://prntscr.com/ckw1pb

I can't find any develop documentation about it. can you please give us little details?

1

1 Answers

0
votes

It's pretty easy to figure it out, just use

print_r($this)

on the vc_row.php template file of Visual Composer and it will reveal you everything.

The simplest way is to add this to your vc_row.php file:

// Add this to your vc_row.php for separate custom css output
// Custom CSS
if(is_single() or is_archive() or is_404()) {
    if($css) {
        echo "<style>$css</style>";
    }
}