I've been trying to figure out how to add an ID to a visual composer element, but I can't figure out how to do so. I've tried editing the row, but the only options I have are Custom CSS Class, Parallax, Full Width and Font Color, but no ID everywhere. I've tried putting id="something" and Id="something" into the shortcode with no good luck.
I need to do this in order to make links to some rows within the same page. If there's another workaround to that, I'm eager to know.
Thanks in advance for any response.
Use el_id
='something'.
Shortcode example:
[vc_row el_id='something'] CONTENT [/vc_row]
It wil be generated like this into the DOM:
<div id="something" class="vc_row wpb_row vc_row-fluid">
I had to solve it also, what I did was to create an "Raw html" module, and add the ID on it:
<div id="section"><div>
and place it above the section you want to link to.
Hope it helps!
This work for me: for add a id to row you can aloso add this code in your function.php theme file:
$attributes = array(
'type' => 'textfield',
'heading' => "HTML ID",
'param_name' => 'element_id',
'value' => '',
'description' => __( "Assign an ID to the row", "discprofile" )
);
vc_add_param( 'vc_row', $attributes );
After if you edit a row you find a new input element titled Html ID.
Source: https://wpbakery.atlassian.net/wiki/pages/viewpage.action?pageId=524335
Visual Composer now has a Row ID field. Since v4.5 I believe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With