Custom Fields
Support General Color picker rwmb arguments

  • Creator
  • #15586
    Resolved FED

    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);
Viewing 1 replies (of 1 total)
  • Author
  • #15597
    Anh Tran

    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.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.