Remove Genesis Taxonomy Meta Fields

This snippet removes the genesis taxonomy meta fields, just add to your functions.php file or a custom plugin file.

<?php
/**
* Remove the term meta added by the Genesis Framework.
*
* @author Joshua David Nelson, [email protected]
*/
add_action( 'admin_init', 'jdn_remove_genesis_term_meta', 11 ); // hook in after genesis adds the tax meta
function jdn_remove_genesis_term_meta() {
$taxonomy = 'category'; // change this to your custom taxonomy
remove_action( "{$taxonomy}_edit_form", 'genesis_taxonomy_archive_options', 10 );
remove_action( "{$taxonomy}_edit_form", 'genesis_taxonomy_seo_options', 10 );
remove_action( "{$taxonomy}_edit_form", 'genesis_taxonomy_layout_options', 10 );
// OR, for multiple taxonomies
$taxonomies = array( 'category', 'post_tag' );
foreach( $taxonomies as $taxonomy ) {
remove_action( "{$taxonomy}_edit_form", 'genesis_taxonomy_archive_options', 10 );
remove_action( "{$taxonomy}_edit_form", 'genesis_taxonomy_seo_options', 10 );
remove_action( "{$taxonomy}_edit_form", 'genesis_taxonomy_layout_options', 10 );
}
}

Source: https://gist.github.com/joshuadavidnelson/238b3e2de1f3f8604fb4

Tags: , ,