I’m using a wordpress plugin shorttag which needs one field to load through a custom field. I want to know how I can echo the customfield inside the plugin php code. I’m a beginner in php so can’t figure this out:
Here’s my code:
$custom_fields = get_post_custom();
$my_custom_field = $custom_fields['donationbar'];
foreach ( $my_custom_field as $value )
echo "$value"; <-- I want this value to go in the goal_id below
donation_can_donation_form($goal_id = 'VALUE HERE', $show_progress = true, $show_description = true,
$show_donations = false, $show_title = false, $title = "", $return = false) ;
I want to load the $value inside the goal_id. This way I will only need to add the ID of the goal in the custom fields and the rest will be hardcoded into the theme.
PS: If there is any other way to code the above function then please let me know. I’m just using what I know and could find in the docs.