When I do get_post_meta($post->ID, "company_wp_box_g", false)
I am getting back an array of key/values pairs.
array (size=1)
0 =>
array (size=7)
'f_name' => string 'John Doe' (length=14)
'f_company_name' => string 'Something Ltd' (length=0)
'f_description' => string '' (length=0)
'f_phone' => string '0208 992 7222' (length=13)
'f_cell_phone' => string '07809775200' (length=0)
'f_email' => string '[email protected]' (length=0)
'f_web' => string 'doe.com' (length=0)
How to get a single value for example f_name
?
just FYI everything is taking place inside foreach loop
:
$args = array(
'numberposts' => -1,
'post_type' => 'company'
);
$posts = get_posts($args);
foreach ($posts as $post){
// do stuff
}