Move content between custom post types

The information about post type is stored in wp_posts table in DB in column post_type – either post, page, attachement and other post types you’ve defined. So i quess you can use some SQL query in your case. Or you can write some script using WP_Query for fetching posts from cerain category (for example), and … Read more

A meta box (in a custom post type) with two different type of fields

If you save the contents of the two input fields into one post_meta value you are able to call them at once. In the save_post action $text = esc_attr( $_POST[‘text’] ); $select = esc_attr( $_POST[‘select’] ); // saves the value as “text select” $combined = trim( sprintf( ‘%1$s %2$s’, $text, $select ) ); update_post_meta( $post_id, … Read more

Saving Meta Data within Custom Post Type

I would try using the post ID that’s automatically passed to save_events, rather than the $post global. So: function save_events( $post_id ){ if ( !wp_verify_nonce( $_POST[‘events-nonce’], ‘events-nonce’ )) { return $post_id; } if ( !current_user_can( ‘edit_post’, $post_id )) return $post_id; update_post_meta($post_id, “events_price”, $POST[‘events_price’] ); update_post_meta($post_id, “events_location”, $POST[‘events_location’] ); } I’m not sure the global $post … Read more