Tag Info

Hot answers tagged

5

From http://codex.wordpress.org/Function_Reference/wp_register_script: <?php wp_register_script( $handle, $src, $deps, $ver, $in_footer ); ?> This means you need to add the $deps and $ver values to wp_register_script() in order to set $in_footer. Like this: wp_register_script( 'justifiedGallery', ...


2

IMHO, I still think that loading scripts and styles directly in the header is bad practice as it is always a problem removing them and loading them coditionally. The best way to work around this is to create a [child theme] and then copy header.php to your child theme. Wordpress will load your child theme's header instead of the parent theme's header. You ...


1

Your question is general, so I cannot answer it in details. If the parent theme enqueues some styles using get_stylesheet_directory_uri() in the path they won't be available in child theme. Then you should enqueue lacking stylesheets in your child's function.php using get_template_directory_uri() which will point to the parent theme directory. Some ...


1

What you might do is check the status of the scripts you are trying to enqueue after doing so. Also, be sure to enqueue things inside of an action. e.g. function do_my_enqueue_scripts() { wp_register_script('isotope', get_template_directory_uri() . '/js/jquery.isotope.min.js',array('jquery'),'',true); wp_enqueue_script('isotope'); } ...



Only top voted, non community-wiki answers of a minimum length are eligible