Storing a DateTime Value in a Sortable Custom Field?

Yes, you can use jQuery DatePicker and save the date, and use query_post to show the postS in order (code also on github): <?php //The Query // exactly than query_posts(‘meta_key=start_date&meta_value=”.date(“Y-m-d”)); // or // dates less than // query_posts(“meta_key=start_date&meta_compare=<=&meta_value=”.date(“Y-m-d”)); // or // date mayor than // query_posts(“meta_key=start_date&meta_compare=>=&meta_value=”.date(“Y-m-d”)); //The Loop if ( have_posts() ) : while ( … Read more

Remove Body Classes

One (untested) suggestion is to replace: unset( $classes[array_search($body_classes, $classes)] ); with $classes = array_diff( $classes, wp_parse_slug_list( $body_classes ) ); assuming the classes survive sanitize_title from wp_parse_slug_list(). It should also be alright with empty arrays. We also note that wp_parse_slug_list() is using wp_parse_list() to parse the comma separated string.