Note that there are some explanatory texts on larger screens.

plurals
  1. POWordpress Enqueue Js scripts
    primarykey
    data
    text
    <p>I am having trouble getting wp_enqueue functions to work. I've looked at all the documentation on it but am having trouble sifting through and finding out what is supposed to go where.</p> <p>so far I understand that I am supposed to register and enqueue the files from the functions.php file of the theme I am creating. So that is exactly what I do. I create some PHP tags and drop it in the middle of them, at the bottom of the page. Save and Upload.</p> <p>When I reload, it just returns a blank white screen, must be an error in the code or something. </p> <p>Here is the function:</p> <pre><code>&lt;?php function add_scripts(){ wp_register_script('jquery', 'http://code.jquery.com/jquery-1.5.2.min.js'); wp_register_script('nivo', get_bloginfo('url').'/scripts/nivo.js'); wp_register_script('slimbox',get_bloginfo('url').'/scripts/slimbox2.js'); wp_register_script('picasa', get_bloginfo('url').'/scripts/jquery.EmbedPicasaGallery.js'); wp_register_script('pwi',get_bloginfo('url').'/jquery.pwi-min.js'); wp_register_script('swf', get_bloginfo('url').'/jquery.swfobject.1-1-1.min.js'); wp_register_script('simpletube',get_bloginfo('url').'/scripts/jquery.simpletube.js'); wp_register_script('jqvalidate', get_bloginfo('url').'/jquery.jqvalidate.js'); wp_enqueue_script('jquery'); wp_enqueue_script('nivo'); wp_enqueue_script('slimbox'); wp_enqueue_script('picasa'); wp_enqueue_script('pwi') wp_enqueue_script('swf'); wp_enqueue_script('simpletube') wp_enqueue_script('jqvalidate'); } add_action('init','add_scripts'); ?&gt; </code></pre> <p>So is there some sort of problem with my syntax? I'm not that strong with PHP. Any help is greatly appreciated. Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload