Make metabox of custom post type fully autosave- and bulk-/quick-edit compatible

WordPress does not send the content of custom fields during autosave (just title, slug and content). That’s why the custom field content will be deleted if you try to save the data: You cannot see the difference between deleted and missing content. I would create a separate autosave function for that, because the way WordPress … Read more

I would like to have different styles for my posts based on the content of each post

Depending on which ‘types’ you need, you might be looking for the Post Format functionality. It allows you to set posts as standard, quotes, galleries, etc (sort of like Tumblr). To activate it, simply toss this into your theme (probably functions.php): add_theme_support( ‘post-formats’, array( ‘aside’, ‘gallery’, ‘quote’ ) ); Then, in your templates, you’ve got … Read more

Get parse_query filter to return slug instead of id

taxonomy & term won’t be set (in this case), since query vars are mapped from GET/POST. In other words, $qv[‘large_feature’] = 291 (see wp_edit_posts_query() and WP_Query::get_posts() for the big picture). add_filter( ‘parse_query’,’convert_large_feature_id_to_taxonomy_term_in_query’ ); function convert_large_feature_id_to_taxonomy_term_in_query( $query ) { global $pagenow; $qv =& $query->query_vars; if ( $pagenow == ‘edit.php’ && isset( $qv[‘large_feature’] ) && ctype_digit( $qv[‘large_feature’] … Read more

Return one unique custom post type result when it shares a custom taxonomy in WP_QUERY?

Thanks guys. I think I may have found a solution. What I did: On taxonomy-types.php, get all Items for that type using WP_QUERY. Loop through them, use get_the_terms() to get taxonomy Model for each Item Still in the loop: use PHP’s in_array() function and a $model_ids array for unique Model checking Still in the loop: … Read more