页面数组仅在第一个 class 上加载脚本

is page array only loading script on first class

知道为什么只在第一个 class brand 而不是 home 加载脚本吗?

<?php
if ( is_user_logged_in() ) {
    //nothing to do here

} if ( is_page( array( 'brand-contact', 'home' ) ) ) { ?>
    //script goes here

<?php } ?>

is_page('home') 不是您要查找的函数。请尝试 is_home()

if ( is_page('brand-contact') || is_home() ) { ?>
    //script goes here

<?php }