Description
Return the field value for the given post
Usage
$string = bw_query_field_value( $field_name, $post_id );Parameters
- $field_name
- ( string ) required – e.g. _oikp_slug
- $post_id
- ( ID ) optional – post ID, if not the global post
Returns
string the value or nullTO DO
Cater for object propertiesTO DO
Cater for multiple valuesSource
File name: oik-fields/shortcodes/oik-related.phpLines:
1 to 7 of 7
function bw_query_field_value( $field_name, $post_id=null ) { if ( null == $post_id ) { $post_id = bw_global_post_id(); } $value = get_post_meta( $post_id, $field_name, true ); return( $value ); }View on GitHub
Called by
1 to 2 of 2
