Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other JS not enqueueing or registering correctly

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43588
    Jeager
    Member

    function portfolio_script_manager() {

    // wp_register_script template ( $handle, $src, $deps, $ver, $in_footer );
    wp_register_script(‘portfolio-masonry’, get_template_directory_uri() . ‘/js/jquery.masonry.min.js’, array(‘jquery’), true, true);
    wp_register_script(‘portfolio-imgload’, get_template_directory_uri() . ‘/js/jquery.imagesloaded.min.js’, array(‘jquery’), true, true);

    // custom scripts (added)
    wp_enqueue_script(‘portfolio-masonry’);
    wp_enqueue_script(‘portfolio-imgload’);

    }
    add_action(‘wp_enqueue_scripts’, ‘portfolio_script_manager’);

    So I copied my theme to test out masonry verse isotope. Made the necessary changes, and now the site doesn’t want to load either of them. if I swap back to the other theme, isotope starts running correctly, but dev tools is saying the files aren’t even there.

    #129365
    Jeager
    Member

    Still not sure whats up. If I add to the footer it works, but this register/enqueue isnt.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Other’ is closed to new topics and replies.