• Resolved dailce

    (@dailce)


    <code role="textbox" aria-multiline="true" aria-label="Code" class="block-editor-rich-text__editable rich-text" style="white-space: pre-wrap; min-width: 1px;" contenteditable="true">Hi is it possibel to add boxes to the product categories? 
    I've tried this but no luck: 
    
    add_filter( 'rwmb_meta_boxes', 'add_pdf_metabox_product_cats', 10, 1 );
    function add_pdf_metabox_product_cats($meta_boxes) {	
    			$pdf_atts_procat = [];
    			
    			$pdf_atts_procat[] =  array(
    				'name' => esc_html__( 'PDF File', 'razzi' ),
    				'id'   => 'pdf_file_procat',
    				'type' => 'file_advanced',
    				'max_file_uploads' => 1,
    				'force_delete'     => false,
    				'max_status'       => false,
    				'desc' => esc_html__( 'Your PDF Download File', 'razzi' ),
    			);	
    			$pdf_atts_procat[] =  array(
    				'name' => esc_html__( 'PDF File Button Text', 'razzi' ),
    				'id'   => 'pdf_file_but_text_procat',
    				'type' => 'fieldset_text',
    				'options' => array('butxt' => 'Button Text')
            
    			);
    			$meta_boxes[] = array(
    			'id'       => 'pdf_download_procat',
    			'title'    => esc_html__( 'PDF File', 'razzi' ),
    			'taxonomies' => 'product_cat',
    			'priority' => 'low',
    			'fields'   => $pdf_atts_procat,
    		);
    		
    		return $meta_boxes;	
    }
    
    
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Product Categories Meta?’ is closed to new replies.