This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Slider Button Default Color

  • Creator
    Topic
  • #9464
    k_b
    Participant

    Hi Jason

    I would like to change the default button color that is used within a slider. Do I need to adjust the default .btn class?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #9468
    Jason Bobich
    Keymaster

    Hello,

    For CSS changes, it’s a good idea to use a tool like firebug or Google Chrome’s built-in developer tools to locate them and then put the overriding edits either in your child theme or in the “Custom CSS” option on your theme options page.

    So, in this case, when you inspect that button you probably see the “btn” class being styled in a general way. You could either re-style that class as-is and end up styling all instances of buttons, or you could then find some sort of DIV or element that wraps your specific scenario and drill down to style it there, specifically.

    .standard-slider-wrapper .btn { … }

    Interestingly, this is actually what “Cascading” means in Cascading Stylesheets (i.e. CSS) — where two selectors may target the same element, but one is more specific than another, and thus gets placed at the higher precedence, with all selectors cascading down in order of specificity.

    =======

    Also, here’s a helpful tutorial on how to use Firebug – http://vimeo.com/20917974. The only thing I’d suggest not doing is actually making edits to the theme’s CSS files, as it shows at the end of that video. However, the video serves as a good introduction to Firebug and how it can be used to find what CSS is effecting certain areas of your site without ever digging around in any files.

    #9488
    k_b
    Participant

    Thanks Jason, fab advise as always!

    K 🙂

    #11252
    John
    Participant

    Is it possible to change the default button site-wide with an api option (giving one of the theme’s pre-defined button colors) that I am not aware of or is this strictly a css issue?
    thanks,
    john

    #11268
    Jason Bobich
    Keymaster

    Is it possible to change the default button site-wide with an api option (giving one of the theme’s pre-defined button colors) that I am not aware of or is this strictly a css issue?

    You wouldn’t be using any kind of API, but there is a filter there when the button is outputted you could get into. See here:

    https://github.com/themeblvd/Theme-Blvd-Sliders/blob/ff1081c66261d8f136848ae4957f819b9f867cd8/includes/sliders-helpers.php#L382

    So, in theory you could do something like this from your own plugin or child theme’s functions.php:

    function my_standard_slider_button( $atts ) {
    	$atts['color'] = 'red';
    	return $atts;
    }
    add_filter( 'themeblvd_standard_slider_button', 'my_standard_slider_button' );
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.