get(): no group, but I need the Post ID

19 views
Skip to first unread message

Thomas Belknap

unread,
Mar 9, 2016, 9:04:06 AM3/9/16
to Magic Fields
I'm having difficulty figuring this out. I need to get post meta by the post ID, but there aren't any groups or repeated fields. So:
get($fieldName, $groupIndex=1, $fieldIndex=1, $readyForEIP=true,$post_id=NULL)

If I call like this, I get no results at all:
get( 'prices_price', null, null, 1, $p->ID )

I've also tried 0's and 1's for the groupIndex and fieldIndex. Same result.

Hunk

unread,
Mar 9, 2016, 8:40:41 PM3/9/16
to Magic Fields
uses 1 for default values and echo for show the value

echo get( 'prices_price', 1, 1, 1, $p->ID );
Reply all
Reply to author
Forward
0 new messages