Can’t insert files in other inputs
You have three input elements with id=”upload_image” and three with id=”upload_image_button”. So jQuery is working with first elements only. Remember, id means identity.
You have three input elements with id=”upload_image” and three with id=”upload_image_button”. So jQuery is working with first elements only. Remember, id means identity.
You can’t have <script> elements within your PHP like that. Either take them out of the PHP delimiters (<?php ?>) or use wp_register_script() and wp_enqueue_script() to get your scripts within WordPress. Update how can i use wp_enqueue_script() with multiple scripts ? wp_register_script( ‘jquery-1.8.2’, get_template_directory_uri() . “https://wordpress.stackexchange.com/scripts/jquery-1.8.2.min.js” ); wp_register_script( ‘contact’, get_template_directory_uri() . ‘/scripts/contact.js’ ); wp_register_script( ‘easing-1.3’, … Read more
Technically yes, you can add those lines to your header.php file just after the wp_head() function and it’ll load the jQuery from a remote source, just like it was on your local machine. If you want to do it properly, take a look at http://codex.wordpress.org/Function_Reference/wp_enqueue_script which will allow you to add it through the wp_head() … Read more
The script never hits a 404 so it continues to load. If I am looking at this correctly it won’t ever hit a 404, and it shouldn’t ever hit a 404. You are loading a page template, the finding and loading of which is going to be done by the main query. That page is … Read more
You have a LOT of plugins on your blog with associated javascript files. The chance that two are conflicting is always present, so you could try and disable the plugins and then enable then one by one (beginning with the most important ones) until you find the one that’s generating errors. That way you can … Read more
Did you check your hosting environment to see if they’ve enabled something like mod_pagespeed? https://developers.google.com/speed/pagespeed/mod
You would enqueue it, this is how Javascript is added to WordPress properly. This function would typically go in your theme’s functions.php or in a plugin. function my_scripts_intro() { is_front_page(){ wp_enqueue_script( ‘introjs’,’path to ..intro.js’ ); wp_enqueue_style( ‘introcss’,’path to ..intro.css’ ); } } add_action( ‘wp_enqueue_scripts’, ‘my_scripts_intro’ ); To determine the state of the visitor you would … Read more
Try using the Screen Options dropdown in the top right corner of your WordPress admin. Uncheck unwanted boxes. If not, you likely have a javascript, jQuery, or php error somewhere.
In simple terms, window.location.href is javascript, and will run in the browser, but PHP runs on the server. In order to execute update_usermeta() you need to open a page with that block of code on it. The best way to do this from a click is to use AJAX (javascript) to visit the URL on … Read more
Not entirely sure what you’re asking but you have to include and register scripts and then enqueue what you require like:- <?php wp_enqueue_script(‘jquery’); ?> (Place immediately before <?php wp_head(); ?>). Which is included with WordPress incidentally. You can read more on wp_enqueue_script for more information on how to use this in your theme. Edit An … Read more