Last active
August 6, 2021 01:47
-
-
Save EricYue2012/535d0b29abc1e4253406c8f2551ed47a to your computer and use it in GitHub Desktop.
WordPress
This file contains hidden or 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
<?php | |
// 1. 显示当前模板文件的路径 | |
// 1. show template file for page | |
// - put in theme functions.php | |
function ey_which_template_is_loaded() { | |
if ( is_super_admin() ) { | |
global $template; | |
print_r( $template ); | |
} | |
} | |
add_action( 'wp_footer', 'ey_which_template_is_loaded' ); | |
// 2. 给WP dashboard添加CSS style | |
// add custom style for WP admin | |
function ey_custom_fonts() { | |
echo '<style> | |
.toplevel_page_bridge_core_dashboard { | |
display: none; | |
} | |
</style>'; | |
} | |
add_action('admin_head', 'ey_custom_fonts'); |
This file contains hidden or 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
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment