• Hey,I’m not sure if it the right place but I’m installing manually template and I run into troubles with the footer.php and the functions.php configuration…

    I try to add js commands

    Footer – This command.
    <?php wp_footer();?>

    functions – This commands.

    function addjs()
    {
        wp_register_script('jquery' , get_template_directory_uri() . /assets/js/jquery-2.1.0.min.js , array()  , 1,1,1);
    wp_enqueue_script('jquery');
    
    wp_register_script('popper' , get_template_directory_uri() . /assets/js/popper.js , array() , 1,1,1);
    wp_enqueue_script('popper');
    
    wp_register_script('bootstrap' , get_template_directory_uri() . /assets/js/bootstrap.min.js , array() , 1,1,1);
    wp_enqueue_script('bootstrap');
    
    wp_register_script('scrollreveal' , get_template_directory_uri() . /assets/js/scrollreveal.min.js , array() , 1,1,1);
    wp_enqueue_script('scrollreveal');
    
    wp_register_script('waypoints' , get_template_directory_uri() . /assets/js/waypoints.min.js , array() , 1,1,1);
    wp_enqueue_script('waypoints');
    
    wp_register_script('counterup' , get_template_directory_uri() . /assets/js/jquery.counterup.min.js , array() , 1,1,1);
    wp_enqueue_script('counterup');
    
    wp_register_script('imgfix' , get_template_directory_uri() . /assets/js/imgfix.min.js , array() , 1,1,1);
    wp_enqueue_script('imgfix');
    
    wp_register_script('custom' , get_template_directory_uri() . /assets/js/custom.js , array() , 1,1,1);
    wp_enqueue_script('custom');
    }
    
    add_action('wp_enqueue_scripts', 'addjs');

    In this situation i’ve this error – “There has been a critical error on your website.”

    If i delete this functions everything back to normal

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘functions.php file edit goes wrong’ is closed to new replies.