Support › General › Color picker rwmb argumentsResolved
I was trying to get the value of a color picker, where I needed to pass the ID of the post.
The following did not work, even though I'm using this technique to get other meta fields from this particular page.
$background = rwmb_meta('guide_color_picker', $child->ID);
I had to pass an empty array to the $args field in order to get the value. Otherwise I was getting an empty stting.
$background = rwmb_meta('guide_color_picker', array(), $child->ID);
Yes, that's right. If you need to pass the value for the 3rd parameter, you have to pass a value for the 2nd parameter. It's just how params in PHP function work.