您可以使用$post
全球的
函数内部的某个位置,适当连接到后期编辑屏幕:
// Globalize the $post variable
global $post;
// check to see that we are on a page, with a title "About Me"
if ( \'page\' == $post->post_type && \'About Me\' == $post->post_title ) {
// This is the "About Me" page;
// do something
}