WordPress + QuickSand jquery plugin small tip
// Create data type markup based on post classes as need by Quicksand jQuery plugin
function data_type( $data_type = '', $post_id = null ) {
echo 'data-type="' . join( ' ', get_post_class( $data_type, $post_id ) ) . '"';
}
Last week I needed to sort some custom posts using the Quicksand plugin. You'll probably know the WordPress function post_class() which can be usefull to sort posts by categories: the only problem is that the function produces a markup like class="post-52 brand type-brand status-publish hentry category-uomo" when Quicksand needs a markup like this data-type="post-52 brand type-brand status-publish hentry category-uomo"
A workaround can be getting the entire function post_class() located in wp-includes/post-template.php, modify the echo part of code (as I did above) and paste it in your function.php






