Tagged: 

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

    hi,

    This is the best theme I’ve ever purchased. Great Great Work.

    But I couldn’t find it anywhere to put some custom js in?

    like zopim, user voice..,etc

    Am I missing something?

    thanks.

    #121061

    Hi,

    You can add additional javascript on functions.php. Find this code

    //register js
    wp_register_script( 'avia-compat', $template_url.'/js/avia-compat.js', array('jquery'), 1, false ); //needs to be loaded at the top to prevent bugs
    wp_register_script( 'avia-default', $template_url.'/js/avia.js', array('jquery'), 1, true );
    wp_register_script( 'avia-shortcodes', $template_url.'/js/shortcodes.js', array('jquery'), 1, true );
    wp_register_script( 'avia-prettyPhoto', $template_url.'/js/prettyPhoto/js/jquery.prettyPhoto.js', 'jquery', "3.1.5", true);
    wp_register_script( 'avia-html5-video', $template_url.'/js/mediaelement/mediaelement-and-player.min.js', 'jquery', "1", true);

    wp_enqueue_script( 'jquery' );
    wp_enqueue_script( 'avia-compat' );
    wp_enqueue_script( 'avia-default' );
    wp_enqueue_script( 'avia-shortcodes' );
    wp_enqueue_script( 'avia-prettyPhoto' );
    wp_enqueue_script( 'avia-html5-video' );

    You can add your own there. We cannot assure you that every javascript is compatible with the theme.

    To register another script add something like this

    wp_register_script( 'new-script', $template_url.'/js/new-js.js', 'jquery', "1", true);

    Then link the new script with this

    wp_enqueue_script( 'new-script' );

    Regards,

    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘custom js ?’ is closed to new replies.