call a function when insert and update a custom post type

This is the original answer but it is little faulty, look below for the updated You can use following approach. The my_action_updated_post_meta is executed after the post insert or update is done: // define the updated_post_meta callback function my_action_updated_post_meta( $array, $int, $int ) { global $post; // see your updated post print_r($post); // make your … Read more

WordPress Post Order

While a common request, WP is quite opinionated that taxonomies are strictly a grouping mechanism and not meant for meaningful order. You can achieve this literally, but it takes quite a bit of custom SQL inserted into query logic. Alternately you could consider splitting your query for your specific requirements. Such as querying posts with … Read more