Wordpress 阻止页脚显示在我的“关于”页面中?

Wordpress 阻止页脚显示在我的“关于”页面中?,wordpress,Wordpress,我试图让它,使我的网站不显示在主页(又名首页)和关于页面页脚。这是我到目前为止的if声明: <?php if ( !is_front_page()): ?> <footer id="colophon" class="site-footer" role="contentinfo"> <div class="site-info"> <a href="<?php echo esc_url( __( 'ht

我试图让它,使我的网站不显示在主页(又名首页)和关于页面页脚。这是我到目前为止的
if
声明:

<?php if ( !is_front_page()):  ?>
    <footer id="colophon" class="site-footer" role="contentinfo">
        <div class="site-info">
            <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'sylvieshimmy' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'sylvieshimmy' ), 'WordPress' ); ?></a>
            <span class="sep"> | </span>
            <?php printf( __( 'Theme: %1$s by %2$s.', 'sylvieshimmy' ), 'Sylvieshimmy', '<a href="http://underscores.me/" rel="designer">Underscores.me</a>' ); ?>
        </div><!-- .site-info -->
    </footer><!-- #colophon -->
<?php endif; ?>

| 

如何使页脚不显示在“关于”页面上?到目前为止,这只适用于头版。“我的关于页面”模板另存为“page about.php”。

您可以使用
is_page()
is_page_模板
条件标记

范例

<?php if ( !is_front_page() && !is_page_template('page-about.php)):  ?>

<?php if ( !is_front_page() && !is_page('name_of_about_page)):  ?>