How to adjust the selector used in JS to target only the one that was clicked on?
$(‘.follow-links a’).toggle(); should be $this.toggle();.
$(‘.follow-links a’).toggle(); should be $this.toggle();.
Querying latitude and longitude into google maps correctly
What if you completely remove the loadDonateScripts function and just add the conditional before enqueuing the scripts like in the the following: function donate_adding_scripts() { if (is_single()) { global $post; if($post->ID==”8436″){ // only for post Id = 8436 wp_register_script(‘donateParsleyJs’, get_template_directory_uri() . ‘/js/parsley.min.js’, array(‘jquery’),’1.11.1′); wp_enqueue_script(‘donateParsleyJs’); wp_register_script(‘donateParsleyHeJs’, get_template_directory_uri() . ‘/js/he.js’); wp_enqueue_script(‘donateParsleyHeJs’); wp_register_script(‘donateJs’, get_template_directory_uri() . ‘/js/donateJs.js’, array(‘jquery’),’1.11.1′, true); … Read more
Javascript function to switch out images
Yes. It is possible. Add a custom link to the href attribute of the function, maybe with attributes for the url. This parameter plan you Parse, like about the global $_GET and run your file, script etc. if it the right parameters. As example, see on the href-Parameter. I add the follow get-parameters in the … Read more
You should be able to dequeue like normal. Despite the complexity of the function, it is really just enqueueing scripts and styles. Tested with the admin bar script on the front end: add_action( ‘wp_enqueue_scripts’, function() { wp_dequeue_script(‘admin-bar’); } ); You just want admin_enqueue_scripts and set-post-thumbnail: add_action( ‘admin_enqueue_scripts’, function() { wp_dequeue_script(‘set-post-thumbnail’); } ); I am not … Read more
Editing the source of a display for posts (to category recent)
Check .htaccess file if it is blocking with this rule: #add_header Content-Security-Policy “default-src ‘self’;”; https://wordpress.org/support/topic/no-visual-edition-is-showing/
Youtube Iframe Api play one video at a time
wp_ajax_{my-action} action hook is only for admin side. For frontend you must use wp_ajax_nopriv_{my-action}. You can combina both if the ajax action is for both sides. For example: add_action(‘wp_ajax_filter_search’, ‘filter_search_result’); add_action(‘wp_ajax_nopriv_filter_search’, ‘filter_search_result’); Also, don’t forget, never, to die or exit at the end of the ajax action because the program is not closed by WordPress … Read more