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

Problem after upgrade to 3.6.1

You should make a backup of your site before any change, including the updates of the WP core, so you can restore if anything goes wrong. That is a gold rule that every webmaster should know. It is possible that you have learnt this lesson just now. Also, it is a good practice to have … Read more

Unable to remove meta box from custom post for all non admin users

Why are you adding metaboxes to non-admin users in the first page? Try this: function PreparePostPageOptions() { if( !current_user_can(‘administrator’) ) // add meta boxes only for admin return; global $WishListMemberInstance; $post_types = array(‘post’, ‘page’, ‘attachment’) + get_post_types(array(‘_builtin’ => false)); foreach ($post_types AS $post_type) { if ($post_type == ‘attachment’) add_meta_box(‘wlm_attachment_metabox’, __(‘WishList Member’, ‘wishlist-member’), array(&$WishListMemberInstance, ‘AttachmentOptions’), $post_type); … Read more