Failing to load my script files in wordpress! i can’t figure out what i’m doing wrong

Probable Cause I strongly suspect that you do not call wp_head() in your header.php file, immediately before the closing HTML </head> tag: <?php wp_head(); ?> </head> You must call this template tag, in order to fire the wp_head action. The wp_head action in turn fires the wp_enqueue_scripts action. So, without having <?php wp_head(); ?> in … Read more

Load external javascript files

You should always use wp_enqueue_script() only, so other scripts can rely on yours or bundle all scripts in one file. Do not load another jQuery; WordPress comes with a built-in jQuery, and other plugins and the core depend on exactly that version. wp_enqueue_script() accepts any valid URL as source file, external or internal. If something … Read more

Newest version of javascript

As the Codex tells us you can add another parameter to the function that holds the version number. wp_register_script( $handle, $src, $deps, $ver, $in_footer ); $ver String specifying the script version number, if it has one, which is concatenated to the end of the path as a query string. If no version is specified or … Read more

creating a static HTML/JS/PHP page

i need to create a static page that allows me to code HTML/JS/PHP… Create a custom page template and integrate your structure in it. .. that connects to a separate MYSQL backend. I don’t know why you want a separate MySQL backend. In your comment, you tell that you’re making a contact form. I guess … Read more

JavaScript Libraries in WordPress

This is how you should do this: function my_scripts_method() { wp_enqueue_script( ‘pikachoose’, // this is your custom name for this JS lib get_stylesheet_directory_uri() . ‘/js/pikachoose/jquery.pikachoose.min.js’, // this is the url address of it’s file (let’s say you put it in your theme directory under /js/pikachoose/ directory array( ‘jquery’ ) // it depends on jquery ); … Read more

Load content dynamically & resize event

Remember that PHP (wordpress) run on server, javascript run on browser. So, what you intend is: load an url of your site (a GET request is sended to server) Server respond with a minimal html containing enquire.js and your script with enquire.register stuff enquire.js recognize resolution and run a js function the function triggered by … Read more