Home / Adding a Custom Field for Products (snippet 3)
Duplicate Snippet

Embed Snippet on Your Site

Adding a Custom Field for Products (snippet 3)

The following example will put the ingredients text area as the last field on the General Tab

Code Preview
php
<?php
get_title() : '';
$product_description       = ( isset( $product ) && null !== $product ) ? $post->post_content : '';
$product_short_description = ( isset( $product ) && null !== $product ) ? $post->post_excerpt : '';
$post_status               = ( isset( $product ) && null !== $product ) ? $post->post_status : '';
/**
 *  Ok, You can edit the template below but be careful!
 */
?>
	
	
		
		
		
		
		
		
		
		
		
		
		
		
	
	
		
		
		
			
			
			
		
		
	
	
	
		
		
		
			
		
		
	
	
		
			
			
			
			
			
				
					
					
					
					
				
				
					
					
				
				
					
					
				
				
					
					
				
				
					
					
					
					
					
					
					
					
				
				 $object_id,
				      'id' 				=> 'wcv_custom_product_ingredients',
				      'label' 			=> __( 'Ingredients', 'wcvendors-pro' ),
				      'placeholder' 		=> __( 'Ingredients', 'wcvendors-pro' ),
				      'desc_tip' 			=> 'true',
				      'description' 		=> __( 'The product ingredients', 'wcvendors-pro' ),
				    ) );
    			?>

Comments

Add a Comment