custom fields


  • (WordPress) Generate post title from custom field

    I had a custom post type that only used custom fields, so I needed to generate a post title from there. Here’s one way. You can if course chain as many if else as you want to check other types. functions.php [php] function custom_post_type_title($post_id) { global $wpdb; if (get_post_type($post_id) == ‘staff’) { $name = get_post_custom_values(‘name’);…