Conditional Tag With Custom Fields Not working correctly

emublimbifigo

New Member
What I am after is to get the Date and title to appear on each Calendar if that Custom Field is filled in; but at the moment, it is putting them in order and displaying a calendar for every child page, but I only want a Calendar and date appear if they have an upcoming date.Any help will be madly appreciated! - See link at bottom for working example.This is what I have at the moment:\[code\] <!-- PHP OF OPEN DAYS -->\[/code\] \[code\]<!-- Calender Items --><div class="calender-item"><?php $values = get_post_custom_values("next_open_day"); if ( is_array($values) ) the_field( 'university_name'); else echo ''; ?><?php $values = get_post_custom_values("next_open_day"); if ( is_array($values) ) the_field('next_open_day'); else echo ''; ?><!-- END OF CALENDER ITEM --> </div><?php endwhile; ?><?php wp_reset_query(); ?>\[/code\]Any idea's then shoot away please...The way my site is spitting it out at the moment is like this:http://universitycompare.net/open-days
 
Back
Top