Skip to content

Instantly share code, notes, and snippets.

@Deaner666
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Deaner666/30034bf4d5846ca48bc7 to your computer and use it in GitHub Desktop.
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
<?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
}
@gerygirl
Copy link

gerygirl commented Feb 9, 2015

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment