Home › Forums › General Issues › Help with disabling a group field on a specific page › Reply To: Help with disabling a group field on a specific page
Sorry John I found the following code in my template for this group, do you know how I could edit it so that this group doesn’t display on my /online-store page too ?
Many thanks!
<?php
$pageid = null;
if( is_home() && !is_front_page() ) {
$pageid = get_option('page_for_posts');
} else {
$pageid = $post->ID;
}
?>
<div class="header-default-top-section">
<div class="container">
<div class="row">
<div class="col-md-9">
<div class="content-box">
<?php if( get_field('main_title', $pageid ) ) : ?>
<h1><?php the_field('main_title', $pageid ); ?></h1>
<?php endif; ?>
<div class="parting"></div>
<?php if( get_field('text_beside_title', $pageid ) ) : ?>
<p><?php the_field('text_beside_title', $pageid ); ?></p>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.