Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Philipp Bammes

    (@tyrannous)

    Hi @cleforweb,
    there are several ways to achieve this. The “smartest” one is probably to copy slick-theme.css to your Child Theme’s css folder and add the following to your function.css:

    
    add_action( 'wp_enqueue_scripts', function() {
    	wp_add_inline_style( 'slick-slider-core-theme', file_get_contents( get_stylesheet_directory() . "/css/slick-theme.css" ) );
    }, 11 );
    

    Note that by using wp_add_inline_style() your CSS will be printed inline in your document.

    You might also use:

    
    add_action( 'wp_enqueue_scripts', function() {
    	wp_deregister_style( 'slick-slider-core-theme' );
    	wp_register_style( 'slick-slider-core-theme', get_stylesheet_directory_uri() . "/css/slick-theme.css", array( 'slick-slider-core' ), '1.6.0' );
    }, 11 );
    

    But doing so, you’ll need to manually add the “Helper CSS” to your document (see the FAQ question “Is it possible to prevent the plugin from adding additional helper CSS on my page?”).

    Alternatively, you may use the “Additional CSS” section of the Customizer.

    Plugin Author Philipp Bammes

    (@tyrannous)

    @cleforweb, any progress on this?

    I’d love to see this thread resolved!

    Thread Starter cleforweb

    (@cleforweb)

    I used code with wp_deregister_style… and this works. I did not add helper css because I am not sure how to do it. Anyway Slick working without it so thank you!

    Plugin Author Philipp Bammes

    (@tyrannous)

    Hi @cleforweb,
    I’m glad it’s working for you.

    Setting this thread’s status to resolved.

    Thread Starter cleforweb

    (@cleforweb)

    OK. Thank you. This is a great plugin.

    Plugin Author Philipp Bammes

    (@tyrannous)

    If you like it, feel free to write a review! 🙂

    Sorry, I just noticed you already did. Stupid me …

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom slick-theme.css’ is closed to new replies.