Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #755635

    Hi. I saw the answer on this link: https://kriesi.at/support/topic/fullscreen-slider-fade-time/
    and I am confident it will work but I am using a child theme and don’t want to make any changes to the original theme files.

    Should I create a folder named js and copy the shortcodes.js file there and make the changes or do I also need to copy some other php file from the main theme folder which links to the shortcodes.js file (I was told that apart from functions.php, all other php files in the child theme replace the parent theme files. Does the same happen for js files or do we also need to copy the php file linking to the php file)?

    #755639

    Hey architchandra,
    Copy the modified shortcodes.js to your_child_theme_folder/js/shortcodes.js and add this at the very end of your child theme functions.php file:

    function change_aviajs() {
       wp_dequeue_script( 'avia-shortcodes' );
       wp_enqueue_script( 'avia-shortcodes-child', get_stylesheet_directory_uri().'/js/shortcodes.js', array('jquery'), 3, true );
    }
    add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );

    Best regards,
    Mike

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