Is this Solution for Caches vs Cookies Going to Get Me in Trouble?

Your solution with comment_author_proxyhash cookie will of course technically work – all caching plugins I know doesn’t analyze hash value and will just stop delivery of cached content based on comment_author_* cookie presense. Problem here is that page caching functionality is something websites really need and often page caching is configured exactly because naked WordPress … Read more

How to correctly include jquery-ui effects on wordpress

While WordPress does include the jQuery UI libraries, it does not include the UI/Effects library. That library is separate and standalone. You’ll need to include a copy of the effects.core.js file and enqueue it separately. Note that you should name it jquery-effects-core when en-queuing it, for naming consistency. You can include it like this: wp_enqueue_script(“jquery-effects-core”,’http://example.com/whatever/effects.core.js’, … Read more

Enqueue core jQuery in the footer?

To do that you will first have to deregister your jQuery script and then register again. If you use jQuery comes with WordPress then following is the function your are looking for. function starter_scripts() { wp_deregister_script( ‘jquery’ ); wp_register_script( ‘jquery’, includes_url( ‘/js/jquery/jquery.js’ ), false, NULL, true ); wp_enqueue_script( ‘jquery’ ); wp_enqueue_style( ‘starter-style’, get_stylesheet_uri() ); wp_enqueue_script( … Read more

Update jquery version

Warning: You shouldn’t replace core jQuery version, especially in the admin panel. Since many WordPress core functionality may depend on the version. Also, other plugin may depend on the jQuery version added in the core. If you are sure that you want to change the core jQuery version, in that case you may add the … Read more

$ not defined using jQuery in WordPress

You can wrap your javascript inside a self-invoking function, then pass jQuery as an argument to it, using $ as the local variable name. For example: (function($) { $(document).ready(function(){ $(“ul.vimeo_desc_feed li a”).click(function(){ alert($(this).attr(‘href’)); return false; }) }); }(jQuery)); should work as intended. If I remember correctly the WP-supplied version of jQuery (the one you get … Read more

How do I send this form's output to a new WordPress page?

It’s better to use Iframe in this case. Here is how I will do it. Do you really need the submit button? in this case I do it without submit button, you can change it to your needs. This example codes can be added to your WordPress page through Text Tab on editor <style type=”text/css”> … Read more

Check if array is empty or null

As long as your selector is actually working, I see nothing wrong with your code that checks the length of the array. That should do what you want. There are a lot of ways to clean up your code to be simpler and more readable. Here’s a cleaned up version with notes about what I … Read more