Last active
April 5, 2021 10:02
-
-
Save gnanasekaran08/53c4f6d62192451e2f60b2720f92bd3e to your computer and use it in GitHub Desktop.
Show/Hide taxonomy page Admin UI
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
// default styles for taxonomy summary page | |
$taxonomy_styles['summary-page'] = '#col-left { display: none; }#col-right { float:none; width: auto; }'; | |
// for create and edit custom taxonomy page | |
$taxonomy_styles['action-page'] = '#col-right { display: none; }#col-left { float:none; width: auto; }'; | |
$current_page = 'summary-page'; | |
$custom_taxonomy_page = false; | |
global $current_screen; | |
if (isset($current_screen) && (isset($current_screen->post_type) && $current_screen->post_type == CUSTOM_POST_TYPE)) { | |
if (isset($current_screen->id) && $current_screen->id == 'edit-'.CUSTOM_TAXONOMY) { | |
$custom_taxonomy_page = true; | |
} | |
} | |
/** Call WP-Inline style hook, for adding the custom taxonomy styles **/ | |
if ($helpie_faq_group_page) { | |
wp_add_inline_style('common', $taxonomy_styles[$current_page]); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment