Created
April 24, 2017 12:21
-
-
Save rajendra89/5994b509941b303a3e505d6e1b6ce288 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_product_options_general_product_data', 'wc_custom_add_custom_fields' ); | |
function wc_custom_add_custom_fields() { | |
// Print a custom text field | |
woocommerce_wp_text_input( array( | |
'id' => '_custom_text_field1', | |
'label' => 'Name', | |
'description' => ' Field, you can write your Name.', | |
'desc_tip' => 'true', | |
'placeholder' => 'Ram' | |
) ); | |
woocommerce_wp_text_input( array( | |
'id' => '_custom_text_field2', | |
'label' => 'Location', | |
'description' => ' Field, you can write your location.', | |
'desc_tip' => 'true', | |
'placeholder' => 'kathmandu' | |
) ); | |
woocommerce_wp_text_input( array( | |
'id' => '_custom_text_field3', | |
'label' => 'Telephone no.', | |
'description' => 'Field, you can write your contact number.', | |
'desc_tip' => 'true', | |
'type' => 'tel', | |
'placeholder' => '123456' | |
) ); | |
woocommerce_wp_text_input( array( | |
'id' => '_custom_text_field4', | |
'label' => 'Acre', | |
'description' => ' Field, you can write your land size.', | |
'desc_tip' => 'true', | |
'type' => 'text', | |
'placeholder' => '3 ropani' | |
) ); | |
woocommerce_wp_text_input( array( | |
'id' => '_custom_text_field5', | |
'label' => 'Bed Rooms', | |
'description' => ' Field, you can write your houses bed rooms.', | |
'desc_tip' => 'true', | |
'type' => 'text', | |
'placeholder' => '5' | |
) ); | |
woocommerce_wp_text_input( array( | |
'id' => '_custom_text_field6', | |
'label' => 'Bath Rooms', | |
'description' => ' Field, you can write your houses bath rooms.', | |
'desc_tip' => 'true', | |
'type' => 'text', | |
'placeholder' => '4' | |
) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment