vendredi 22 avril 2016

How to add an HTML attribute to vc_btn (WP Bakery Visual Composer)?

I need to add attribute "rel" to vc_btn.

When i add to functions.php

 $attributes = array(
     'type' => 'textfield',
     'heading' => "rel nofollow",
     'param_name' => 'element_rel',
     'value' => '',
     'description' => 'Add nofollow?'
    );

    vc_add_param( 'vc_btn', $attributes );

It shows when i edit button (backend). But nothing happens on page (front). vc_btn is loaded as one of the elements by Grid Post. I have tried to copy vc_btn.php from /include/templates/shortcodes/ to created dir /vc_templates/ in theme directory. I have tried this, but nothing: How do I add an HTML attribute to row (WP Bakery Visual Composer)?

Problem is that when Grid Post load content it is not using vc_btn.phg from /include/templates/shortcodes/vc_btn.php (or my_theme/vc_templates/vc_btn.php ) but from /include/templates/params/vc_grid_item/attributes/vc_btn.php

Thans for any help



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire