如果它与is_home()
那我想这只是你鼻涕虫的问题。
你试过检查is_page
直接通过it ID?
像这样的东西应该会回来
/*
* Returns true when the Pages displayed is either post ID 1,
* or post_name "top-best", or post_title "Top Best".
* Note: the array ability was added in version 2.5.
*/
is_page( array( 1, \'top-best\', \'Top Best\' ) );
资料来源:https://developer.wordpress.org/reference/functions/is_page/#comment-370