Created
January 27, 2024 21:46
-
-
Save taricco/f4765a9f0d850be0b8d1b4f95ca598a0 to your computer and use it in GitHub Desktop.
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
/*** Hide default taxonomy panels for Match CPT taxonomies | |
–––––––––––––––––––––––––––––––––––––––––––––––––– ***/ | |
function hide_match_taxonomy_metaboxes() { | |
$screen = get_current_screen(); | |
// Check if the current screen is the 'match' custom post type | |
if ( $screen->post_type === 'match' ) { | |
echo ' | |
<style type="text/css"> | |
#custom_match-status, | |
.components-panel__body:has(>.css-1n451hs.e19lxcc00) { | |
display: none; | |
} | |
</style> | |
'; | |
} | |
} | |
add_action( 'admin_enqueue_scripts', 'hide_match_taxonomy_metaboxes' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment