Site logo

[Resolved] Create Child theme with Slick Slider Included

Home Forums Support [Resolved] Create Child theme with Slick Slider Included

Home Forums Support Create Child theme with Slick Slider Included

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2570648
    Chetan Patil

    Hi
    I am trying to create a child theme in which I want slick slider and jquery enabled.
    Please share me the correct code/function to integrate the slick slider
    Here is my theme directory https://prnt.sc/dbgqQBMPRp0Q
    and https://prnt.sc/0W2mLAZtn-Ah these files I want to be included.

    Regards

    #2570650
    Fernando
    Customer Support

    Hi Chetan,

    This would be out of our scope of support. I found this video though: https://www.youtube.com/watch?v=_hzIwvuSXpc

    You can try using a Hook Element to hook these resources as was done here: https://generatepress.com/forums/topic/slick-slider-where-to-place-js-in-gp-hooks/

    Hope these help!

    #2570659
    Chetan Patil

    Hi Fernando.,
    Thank you for your reply.
    I was asking the correction of my enqueue script.

    //add third-party styles and scripts
    
    function uikit_css_stylesheets() {
        wp_enqueue_style('uikit_css', get_stylesheet_directory_uri().'/slick/slick.css', array('cjt_tusoporte_wp'), '1.0');
        wp_enqueue_style('uikit-js', get_stylesheet_directory_uri().'/slick/slick.js', array('jquery'), '1.0');
    }
    add_action('wp_enqueue_scripts','uikit_css_stylesheets');

    It is not getting reflected on my website frontend.

    Regards

    #2570673
    Fernando
    Customer Support

    Try replicating the one here: https://developer.wordpress.org/reference/functions/wp_enqueue_script/#comment-274

    Make sure to replace wp_enqueue_style with wp_enqueue_script for JS scripts.

    #2570838
    Chetan Patil

    Hi,

    Thank you for your response. It worked. Thank you.
    🙂

    #2573442
    Fernando
    Customer Support

    You’re welcome, Chetan! 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.