AJAX and Jquery Conflicts
With the increasing popularity of WordPress, many themes are being released daily. Unfortunately many of these themes are poorly coded and some others do not follow the WordPress coding standards.
If you have been experiencing issues with Ajax calls and elements that make use of the jQuery Library after you installed a WordPress Plugin, make sure you go through the list of possible causes below.
It is quite easy to identify a theme or a plugin that doesn`t use the wp_enqueue_script function. You can open your theme`s header.php and footer.php files, if you see something like this:
It means that your theme is manually inserting the files on your website, in this case, if one of your plugins wants to use this same file it will insert a second instance of it, causing some of the features that use the script not to work properly.
The easiest way to fix this issue is to remove the script from your theme header.php, by doing this, only the version being used by your plugin would be called on your website.
jQuery not using compatibility mode
/* How jQuery is taught on most tutorials */ $("#element_id").whatever();
But since WordPress has some other libraries that may be used by different themes and plugins, the use of $ may cause conflicts between these scripts. If you are familiar with Firebug or any other developer tool used to debug your code, you should probably be seeing the following error on your Console: “$ is not a function”
/* How jQuery should be used on WordPress */ jQuery("#element_id").whatever();
Theme making modifications in a shortcode output
The raw tag is usually added by the theme itself in order to solve this kind of issue, but if by any chance your theme doesn`t support it, you must get in contact with the theme creators and ask them about the function that is modifying your content output and how to disable it.
Missing wp_header and/or wp_footer functions on theme
Inside your theme header.php you must insert the following code right before the </head> closing tag:
<!-- Here you should see a lot of tags and content --> ... ... <!--?php wp_head(); ?-->
Inside your theme footer.php you must insert the following code right at the bottom of the file:
<!--?php wp_footer(); ?-->
You can see a detailed guide about both functions here: www.buckleupstudios.com/blog/wordpress-wp_head-wp_footer-functions/