Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #206896

    Hi,

    I am trying to add custom javascript with a child theme to avoid losing it when updating the theme, but I cannot find a post explaining how to do it.

    If I create an avia.js file in a js folder inside the child theme it does not seem to trigger. Am I missing something?

    #207015

    Hi Xavier!

    You can use wp_enqueue_script, please take a look: http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    Cheers!
    Josue

    #209380

    Hello,
    i’m not familiar with php,
    how can i had
    avia.js, and particulary this code :
    jQuery(“.iconlist_icon”).each(function(){
    var theLink = jQuery(this).siblings(“article”).find(“.iconlist_title a”).attr(“href”);
    if(theLink) {
    jQuery(this).on(“click”, function(){
    window.location.href = theLink;
    });
    }
    });

    to my enfold child theme ?

    #209554

    Hi!

    Please refer to this topic: https://kriesi.at/support/topic/custom-js/

    Best regards,
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to add custom javascript with child theme’ is closed to new replies.