Last active
August 29, 2015 14:07
-
-
Save Deaner666/30034bf4d5846ca48bc7 to your computer and use it in GitHub Desktop.
Add a custom meta textarea to the "Add Term" page of a WooCommerce product_cat
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
<?php | |
// Add term page | |
add_action( 'product_cat_add_form_fields', 'wpm_taxonomy_add_new_meta_field', 10, 2 ); | |
function wpm_taxonomy_add_new_meta_field() { | |
// this will add the custom meta field to the add new term page | |
?> | |
<div class="form-field"> | |
<label for="term_meta[custom_term_meta]"><?php _e( 'Details', 'wpm' ); ?></label> | |
<textarea name="term_meta[custom_term_meta]" id="term_meta[custom_term_meta]" rows="5" cols="40"></textarea> | |
<p class="description"><?php _e( 'Detailed category info to appear below the product list','wpm' ); ?></p> | |
</div> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
is it possible to do the same for the product attributes archive page? I would like to add some extra text on the bottom of that pages. How would than the code look like?