Automatically convert standard posts with custom fields to custom post types

The question: what is the easiest way to convert standard posts with custom fields into a new custom post type There’s no “easy” way. Consider that all posts have custom fields (some are hidden, and WordPress will add them). So you would need to convert post types based on the presence / value of specific … Read more

Custom Field to post_title

You can achieve this using the save_post hook. save_post is an action triggered whenever a post or page is created or updated, which could be from an import, post/page edit form, xmlrpc, or post by email. add_action( ‘save_post’, ‘wpse254017_set_post_title’, 10, 2 ); function wpse254017_set_post_title ( $post_id, $post ){ //This temporarily removes action to prevent infinite … Read more