assigning value from custom field
-
hello dylan,
i’ve been trying this the whole day and i can’t just get it to work. pls help me.
am using ‘allow php in post and pages’ plugin to create shortcodes of geomashup wherever i like to put it.
echo GeoMashup::list_located_posts ( array(
‘near_lat’ => ‘10.310661’,
‘near_lng’ => ‘123.980167’,
‘radius_km’ => ‘1’,what i want to do is to pass the values from the custom field like this:
$lat = get_custom_field(‘custom_lat’, FALSE);
$lng = get_custom_field(‘custom_lng’, FALSE);‘near_lat’ => ‘.$lat.’,
‘near_lng’ => ‘.$lng.’,but it won’t let me save it, error. am i doing right? the way i assign these values to the fields?
by the way, i tried
echo $lat and it displayed the correct value, so it’s passing it successfully.
- The topic ‘assigning value from custom field’ is closed to new replies.