我为“联系人信息”创建了一个组字段,并定义为仅在主页中编辑它。
它在主页上工作。但是如果我转到网站的另一个页面,字段就会消失
标题中联系人信息的我的代码。php是:
<header>
<section class="container-top">
<div class="wrapper">
<span>
<?php the_field( \'telefone_header\' ); ?>
</span>
<a href="mailto:<?php the_field( \'email_header\' ); ?>">
<?php the_field( \'email_header\' ); ?>
</a>
<?php get_search_form(); ?>
</div>
</section>
<section class="container-header">
<div class="wrapper">
<h1>
<a href="<?php echo esc_url( home_url( \'/\' ) ); ?>" title="Limpen">
<img src="<?php bloginfo( \'template_directory\' ); ?>/images/limpen.jpg" alt="Limpen">
</a>
</h1>
<nav>
<?php wp_nav_menu ( array (
\'container\' => false,
\'items_wrap\' => \'<ul>%3$s</ul>\',
\'walker\' => new My_Walker_Nav_Menu()
)
); ?>
<div class="ico-menu"></div>
</nav>
</div>
</section>
</header>
和页脚。php是:
<div class="links">
<strong>
Fale Conosco
</strong>
<div class="info">
<strong>
<?php the_field( \'titulo_empresa\' ); ?>
</strong>
<a href="mailto:<?php the_field( \'email_empresa\' ); ?>"><?php the_field( \'email_empresa\' ); ?></a>
<span><?php the_field( \'telefones_empresa\' ); ?></span>
<address>
<?php the_field( \'endereco_empresa\' ); ?>
</address>
</div>
</div>