Title: Problem with Ajaxify option
Last modified: August 31, 2016

---

# Problem with Ajaxify option

 *  Resolved [mibrito707](https://wordpress.org/support/users/mibrito707/)
 * (@mibrito707)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-ajaxify-option/)
 * Hello there:
    Let me thank you for this amazing plugin, it’s really very good.
   No my problem is this: I’m developing my own template and so far so good but 
   in my optimization process I remove the default WP jquery registered script hook
   and use the google CDN also I move it to the footer to optimize even a little
   more. So long history short, now I’m trying to use the Ajaxify option (because
   I also using Wp Super Cache plugin) and since you insert a js code snipped in
   the middle of the page and the jquery is on the footer I’m getting the “WordPress
   Popular Posts: jQuery is not defined!”. I’m wondering if you can update the plugin
   to insert this js snipped on the footer, bellow all js includes. Thank you again.
 * [https://wordpress.org/plugins/wordpress-popular-posts/](https://wordpress.org/plugins/wordpress-popular-posts/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/problem-with-ajaxify-option/#post-7205832)
 * Hi there!
 * You answered your own question in your comment: since the script is inserted 
   in the middle of the page jQuery needs to be loaded by then or else it won’t 
   work.
 * By default WordPress inserts jQuery in the header section of your theme for this
   very reason: most scripts out there expect it to be in there, including of course
   WPP.
 * Another reason to leave jQuery alone is that in practice you won’t gain that 
   much by moving it to the footer section as Jquery’s only 32kb (when minified 
   and gzipped). Doing so will also bring more troubles than benefits: are you planning
   to contact every developer out there to ask them to move their scripts to the
   footer or find a way around this? 😛
 * TLDR;
 * Just leave jQuery alone. Moving it to the footer won’t give you any benefits 
   and will break most plugins / scripts out there. It’s not worth it.
 *  [Alex](https://wordpress.org/support/users/flyjam/)
 * (@flyjam)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/problem-with-ajaxify-option/#post-7205991)
 * Hi Hector,
 * If you don’t mind I just put my thoughts. If your plugin had the option to remove
   the inline script and then add it tp the footer, it would be great and very helpful
   for those who are crazy on their site’s optimization. And this would be a quick
   fix when various optimizers used in themes (which usually take all scripts to
   the footer).
 * For example, TOP 10 plugin does it by removing Filter and calling the tracking
   function wherever you need.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Problem with Ajaxify option’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Alex](https://wordpress.org/support/users/flyjam/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/problem-with-ajaxify-option/#post-7205991)
 * Status: resolved