rookie mistake isset($_POST
*facepalm* $_POST is always set, it can only be empty.
*facepalm* $_POST is always set, it can only be empty.
Always check for local time Despite the fact that my server timezone was set correctly, somehow time() was giving wrong ( UTC) hour. So i ended up using wp’s functions to make sure. $now = current_time( ‘timestamp’, 0 ) ;$local_ts = get_the_time(‘U’,$post->ID);
Queries are only available after “wp” action hook, so ‘init’ is too early to check for it.
Time and again i fall for this same simple mistake. This may not be intuitive in the context of serialized arrays. If you fetch a serialized array with this method you want $single to be true to actually get an unserialized array back. If you pass in false, or leave it out, you will have…
I’ve been pulling my hair why my custom cursor wouldnt work. Turns out, IE (yes, big surprise) takes site url instead of stylesheet as baseurl when it comes to cursors.
My navigation menu started disappearing on category pages. First I suspected there was something with the header or menu location, I have double, triple checked everything and I was pulling my hair out trying to find a solution. Turns out, my attempt to order posts by a custom field interfered with the menu. if( ! $query->is_main_query())…
Actually, you do not want to open memcached port in your firewall. #ref: http://serverfault.com/questions/530051/memcached-ports-and-csf