Dynamic number of fields in a meta box

$fl is ‘quantity’, but from your code snippet it is not clear what $id is set to. I think it is something like 481 or 708. So name=”‘.$fl.’-‘.$id. ‘” will result in quantity-481 or quantity-708 and not quantity-708-481. Check the HTML of your metabox if the name is what you expect (use something like FireBug … Read more

Is ‘repeatable’ a field type for meta boxes?

WordPress has no real form API, you have to create almost all form elements from scratch. ‘type’ => ‘repeatable’ is part of an external library. Google lead me to this article: Reusable Custom Meta Boxes Part 3: Extra Fields – maybe a starting point for your research?

Get meta field value of all catgories

If you’d use the get_categories() function to get all the categories, you can then loop through them. Partial pseudo code, but this will do the trick: $categories = get_categories( array() ); $colors = array(); foreach ( $categories as $category ) { $cat_meta = get_option( ‘meta_field_’ . $category->slug ); if (isset($cat_meta[‘color’])){ $colors[ $category->term_id ] = $cat_meta[‘color’]; … Read more

Hybrid meta box, how to show?

Problem solved: <?php echo get_post_meta( get_the_ID(), ‘doc’, true ) ?> ‘doc’ fetches one of meta_boxes array items. Then you can echo them And.. check if you are editing the right single.php (my mistake).