Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #242418

    Hi

    i nedd to add a class to a av_button like this: <a class="some_class" href=”#” target=”_blank”>click here< /a >

    Can anyone explain how to to this?

    #243202

    Hey Chris!

    Open up wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/buttons.php and replace:

    
    $output .= "<a href='{$link}' class='avia-button ".$this->class_by_arguments('icon_select, color, size, position' , $atts, true)."' {$blank} {$style} >";
    

    with

    
    $output .= "<a href='{$link}' class='avia-button some_class ".$this->class_by_arguments('icon_select, color, size, position' , $atts, true)."' {$blank} {$style} >";
    

    and instead of some_class insert your class. If you don’t want to modify the parent theme copy the wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/buttons.php file to your child theme and follow the instructions here: https://kriesi.at/support/topic/add-elements-to-visual-composer/

    Best regards,
    Peter

    #272723

    Edit: I replied to this thread, asking about how to put a different CSS class on each button. I found the answer here: https://kriesi.at/support/topic/custom-css-class-input-field/. Just add this line in functions.php (for the parent theme, if you are using a child theme): add_theme_support('avia_template_builder_custom_css');

    • This reply was modified 10 years, 6 months ago by DalandanUX. Reason: Found the answer in another thread
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to add a class to a button?’ is closed to new replies.