meta_query Where the key value is stored as an array

Thanks to the help of @JacobPeattie the problem was how the data was being saved. So instead of: if(isset($_POST[‘assign-classes’])) { update_post_meta( $post->ID, ‘assign-classes’, $_POST[‘assign-classes’] ); } It is now: delete_post_meta($post->ID, “assign-classes”); for($i = 0; $i < count($_POST[‘assign-classes-all’]); $i++){ add_post_meta( $post->ID, ‘assign-classes’, $_POST[‘assign-classes-all’][$i], false ); } Only thing that was weird is that at first I … Read more

Custom post type and custom taxonomy key lenght & query performance

I’m not sure about the sort of precise figures a performance/algorithm researcher would be looking for. However, in terms of actual performance there is no difference. The WP database can take a beating and I’ve done plugins with dozens and dozens of filters and hooks and queries and they still run very very fast. Furthermore, … Read more