Skip to content

Instantly share code, notes, and snippets.

@Deaner666

Deaner666/functions.php

Last active Aug 29, 2015
Embed
What would you like to do?
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

This comment has been minimized.

Copy link

@gerygirl 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