Support

Account

Home Forums General Issues Control Display of Custom Field Reply To: Control Display of Custom Field

  • Okay, I’ve tried the above using this method but the widget block just disappeared and doesn’t appear on ANY pages.

    <?php
    $excluded = get_field('excluded_pages_field', 1255, 1509, 1213, 1293, false);
    global $post;
    if( $excluded && !in_array($post->ID, $excluded) ){
    
    	 $eventcontent = get_field('event_content', 1368);
    	 $moredetails = get_field('more_details', 1368);
    	 $eventimage = get_field('event_image', 1368);
               
     if(!empty($eventcontent) ): ?>
    	<section class="boldSection gutter btBottomVertical btParallax">
        	<div class="specialevent" style="background:  linear-gradient(to right, rgba(255,255,255,1) 0%,rgba(255,255,255,1) 16%,rgba(255,255,255,1) 50%,rgba(255,255,255,0.01) 52%,rgba(255,255,255,0) 55%), url(<?php echo $eventimage; ?>); background-size: cover!important; background-repeat: no-repeat!important; background-position: right center!important;"> 
                <div class="col-sm-6">
                		<header class="header btDash bottomDash">
                        	<div class="dash">
                            	<h2>
                                	<span class="headline">Special Event</span>
    						 	</h2>
                        	</div>
                        </header>
                		<?php echo $eventcontent; ?>
                		<a href="<?php echo $moredetails; ?>" class="btBtn btBtn btnOutlineStyle btnAccentColor btnBig btnHalfWidth btnRightPosition btnNoIcon"><span class="btnInnerText">More Details</span></a><a href="about/season-tickets/" class="btBtn btBtn btnOutlineStyle btnAccentColor btnBig btnHalfWidth btnRightPosition btnNoIcon"><span class="btnInnerText">Get Tickets</span></a>
                	<div class="btClear btSeparator topSemiSpaced noBorder"><hr></div>
               </div>           
            </div>
       </section>
     <?php endif; ?>  
     <?php } ?>