[Plugin: TDO Mini Forms] Title using 3 Custom Fields and Example Codes Not Working
-
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?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘[Plugin: TDO Mini Forms] Title using 3 Custom Fields and Example Codes Not Working’ is closed to new replies.