Support

Account

Home Forums Front-end Issues ACF's in header.php showing everywhere but on search results page Reply To: ACF's in header.php showing everywhere but on search results page

  • … actually, strike that: I was too quick with drawing conclusions.

    This has nothing to do with the Jesse Heap snippet of code.

    I found that if I use ACF group and use code like this to display a sub item in that group:

    			<?php if( have_rows('site_header', 'option') ): ?>
    				<?php while( have_rows('site_header', 'option') ): the_row(); ?>
    					<?php if(get_sub_field('phone', 'option')) : ?>
    						<div id="phone">
    							<span class="hide-on-phone hide-on-tablet"><?php the_sub_field('phone_header', 'option') ?></span>
    							<a href="tel:<?php the_sub_field('phone_computer', 'option') ?>"><?php the_sub_field('phone', 'option') ?></a>
    						</div>
    					<?php endif; ?>
    				<?php endwhile; ?>
    			<?php endif; ?>

    … that this will not display on a search results page. A bug?