Home Forums Unicon Add custom color to WPBakery buttons

Home Forums Unicon Add custom color to WPBakery buttons

  • Creator
    Ticket
  • #87837
    dsh1905
    Buyer

    Hi,

    I have tried to follow the WPBakery method of adding more colors to buttons, but for some reason, I can’t make it work. I used the following code:

    function add_btn_color()
    {
        //Get current values 
        $param = WPBMap::getParam('vc_btn', 'color');
        //Append new value to the 'value' array
        $param['value'][__('custom color 1', 'CustomColor')] = 'CustomColor';
        vc_update_shortcode_param('vc_btn', $param);
    }
    add_action('vc_before_init', 'add_btn_color');
    

    Best
    D

Sorry, only verified customers can view ticket replies.