Skip to content

Instantly share code, notes, and snippets.

@joshuadavidnelson
Last active August 29, 2015 14:17
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 joshuadavidnelson/238b3e2de1f3f8604fb4 to your computer and use it in GitHub Desktop.
Save joshuadavidnelson/238b3e2de1f3f8604fb4 to your computer and use it in GitHub Desktop.
Remove Taxonomy Genesis Metaboxes
<?php
/**
* Remove the term meta added by the Genesis Framework.
*
* @author Joshua David Nelson, josh@joshuadnelson.com
*/
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 );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment