Support » Plugin: CMB2 » Output multicheck selection into cpt’s edit page in a custom column

  • Resolved EliWbbr

    (@eliwbbr)


    I’m adding custom columns to the overview page (edit.php) of a custom post type called Products. One of those columns should output the user selection from a multicheck field. Unfortunately that is not happening. Here is that particular snippet from my functions file:

    
    /* If displaying the 'product type' column. */
    case 'type' :
    	/* Get the product type for the post. */
    	$types = get_post_meta( get_the_ID(), '_cmb2_type_multicheckbox', true );
    	foreach ( (array) $types as $key => $type ) {
    		echo $type;
    	}
    	/* If no product type was found, output a default message. */
    	else {
    		_e( 'Unknown' );
    	}
    break;
    

    Any suggestions?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Output multicheck selection into cpt’s edit page in a custom column’ is closed to new replies.