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

    Hello,

    I’ve got a child theme from enfold.
    I want to change 1 setting in avia.js and thought that it was enough to make a js folder in the child theme with the avia.js in it with my changes. But he keeps pointing to the avia.js from the normal theme.

    How is that possible and can I change that?

    Gr. Jeen

    #230498

    Hey 12Switch!

    Create a js folder then place a avia.js file inside. Add this on the child theme’s functions.php:

    function wp_change_aviajs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_print_scripts', 'wp_change_aviajs', 100 );
    

    Cheers!
    Ismael

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