I want to get a custom post value from post ID
PHP code :
$custom_field = get_post_meta(2055, the_field('titdesc'));
var_dump($custom_field);`
Output :
array(6) {
["_edit_last"]=>
array(1) {
[0]=>
string(1) "1"
}
["_edit_lock"]=>
array(1) {
[0]=>
string(12) "1373450528:1"
}
["_wp_page_template"]=>
array(1) {
[0]=>
string(8) "work.php"
}
["titdesc"]=>
array(1) {
[0]=>
string(34) "and some experience, coffee & fun."
}
["_titdesc"]=>
array(1) {
[0]=>
string(19) "field_51baf57155c20"
}
["dsq_thread_id"]=>
array(1) {
[0]=>
string(0) ""
}
}
I want ["titdesc"]
value but not able to get what to write in PHP to get ["titdesc"]
's value.
get_field()
instead ofthe_field()
.