I have this code on the WP Editor

<p>[vc_row][vc_column][le_page_grid le_page_grid_layout="1"][/vc_column][/vc_row]</p>

and i have two radio buttons on the meta box

<label><input type="radio" name="layout" value="1" /> Layout 1</label>
<label><input type="radio" name="layout" value="2" /> Layout 2</label>

My question is how can i change the value of le_page_grid_layout="1" to le_page_grid_layout="2" using jquery when i click on Layout 2 and vice versa.

Thanks in advance

1 Answer 1


Shortcodes are backend stuff, so you can't just change values of shortcodes itself in editor with jQuery, the thing you can do is to call both shortcodes, hide one of them, and on click show him and hide other one. It all depends what do you want to do, but one of the option is to hide them like this and in this case use classes also with display:none

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.