By example, on this page, this should be displaying all programs:
https://www.afxstudentexchange.com/australia/programs/
On the other hand the code is working well here (the header is a ACF fields and it’s displaying):
https://www.afxstudentexchange.com/australia/programs/paris-group-tour/
My code on the broken page https://www.afxstudentexchange.com/australia/programs/
looks like this and it was working fine before. I’m not sure what to do… Do you think you could help?
A big big thanks for anyone who is happy to help!!!!
<?php get_header(); ?>
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<div id="blogSingleLargePage">
<?php $values = get_field('header_page',$post->ID); ?>
<?php if($values) {?>
<img src="<?php the_field('header_page'); ?>" class="headerPage"/>
<?php } ?>
<div class="post">
<h1><?php the_title(); ?></h1>
<hr/>
<div class="entry">
<?php the_content(); ?>
<!-- add matt -->
<div class="tableProgLeft">
<table class="tableProgramCat">
<h3>High school programs details</h3>
<hr/>
<?php $args = array ( 'category' => 12, 'posts_per_page' => 20, 'order' => 'ASC');
$myposts = get_posts( $args );
foreach( $myposts as $post ) : setup_postdata($post); ?>
<?php if(has_category(3,$post->ID)) {?>
<?php if(get_field('header_page',$post->ID)) {?>
<tr>
<td class="tableProgramImg" >
<a href="<?php the_permalink(); ?>">
<img src="<?php the_field('header_page'); ?>" class="thumbyProg2"/>
</a>
<a href="<?php the_permalink(); ?>"><strong><?php the_title(); ?></strong><br/>
<?php $excerpt = get_the_excerpt();
echo string_limit_words($excerpt,55); ?>...</a>
</td>
</tr>
<?php } ?>
<?php } ?>
<?php endforeach; ?>
</table>
</div>
]]>