I have been through this forum and the TDO forum and the code examples are not working for me. I can make a title using one custom field with this code:
<?php
/* assuming you have called the custom field key "State"... */
$post_title = get_post_meta($post_id, 'State', true);
$postdata = array( "ID" => $post_id, "post_title" => $post_title);
sanitize_post($postdata,"db");
wp_update_post($postdata);
?>
When I follow the coding examples in the forums and create this code
all I get is the date and time stamp:
<?php
$description = get_post_meta($post_id, ‘Description’, true);
$city = get_post_meta($post_id, 'City', true);
$state = get_post_meta($post_id, 'State', true);
$post_content = $description . $city. $state;
$postdata = array(
“ID” => $post_id,“post_title” => $post_content);
sanitize_post($postdata,”db”);
wp_update_post($postdata);
?>
I have also tried replacing post_content with post_title.
Any ideas?