Thanks..This is the category code for accommodation. I am sure though the code will be OK..as it was working fine. I am wondering if third party plugin is to blame here. De-activating but still no luck
<section class="contentWrapper">
<span id="bc">You are here:</span>
<?php if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('<p id="breadcrumbs">','</p>');
} ?>
<?php if(is_category(array(20,18,21,22,19,23))){ ?>
<h1>Stay <span>- <?php echo single_cat_title() ?> Accommodation</span></h1>
<?php } else { ?>
<h1>Stay <span>- Waiheke Accommodation</span></h1>
<?php }?>
<div class="clear"></div>
<?php
$categories = get_the_category();
foreach ($categories as $cat) {
}
$category = get_category($cat);
if ($category->cat_ID) {
if($category->category_parent)
$children = wp_list_categories('hide_empty=0&orderby=name&child_of=' . $category->category_parent . '&title_li=&echo=0');
else $children = wp_list_categories("orderby=name&hide_empty=0&title_li=&child_of=".$category->cat_ID."&echo=0");
$children = str_replace('<li>No categories</li>', '', $children);
}?>
<nav class="sub_nav">
<ul>
<?php echo $children ?>
</ul>
</nav>
<?php $catID = get_query_var('cat'); ?>
<aside id="intro">
<?php echo category_description( $catID ); ?>
</aside>
<div class="clear"></div>
<section class="article_wrapper">
<?php
$featured = new wp_query();
$featured->query('cat=' . $catID . '&showposts=1&orderby=rand');
while($featured->have_posts()) : $featured->the_post();
$wp_query->in_the_loop = true;
$featured_ID = $post->ID; ?>
<article class="feature">
<h2>Feature</h2>
<figure>
<?php $imgrow = 1; ?>
<?php while(the_repeater_field('images')): ?>
<?php if($imgrow == 1) { ?>
<a href="<?php the_permalink(); ?>"><img src="<?php the_sub_field('image'); ?>" alt="<?php the_title(); ?>"/></a>
<caption></caption>
<?php } ++$imgrow; ?>
<?php endwhile; ?>
</figure>
<div class="articleContent">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p><?php custom_excerpt(60); ?>
<footer>
<p><strong>Tagged: </strong><?php echo get_the_category_list(__( ' ', '' )); ?><?php the_tags('', '', ''); ?></p>
</footer>
</div>
<?php endwhile; ?>
</article>
<div class="clear"></div>
<!-- Google Sub Header Menu -->
<div class="googleSubAds">
<ul>
</ul>
</div>
<!-- end -->
<?php $i = 1 ?>
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<article class="listing captionfull<?php if($i == 3) echo " last"; ?>">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<figure>
<?php $imgrow = 1; ?>
<?php while(the_repeater_field('images')): ?>
<?php if($imgrow == 1) { ?>
<a href="<?php the_permalink(); ?>"><img src="<?php the_sub_field('image'); ?>" alt="<?php the_title(); ?>" /></a>
<caption></caption>
<?php } ++$imgrow; ?>
<?php endwhile; ?>
</figure>
<div class="articleContent">
<p><?php custom_excerpt(12); ?>
</div>
</article>
<?php if($i == 3){
$i = 1;
} else {$i++;}
?>
<?PHP endwhile ?>
</section><!--end of article_wrapper-->
<?php else: ?>
<div class='noListings'>
<h2><?php _e('Sorry, there are currently no listings under this section. We actively working on this..come back again soon.'); ?></h2>
</div>
<?php endif; ?>
<?php
global $wp_query;
$total_pages = $wp_query->max_num_pages;
if ($total_pages > 1){
$current_page = max(1, get_query_var('paged'));
echo '<div class="page_nav">';
echo paginate_links(array(
'base' => get_pagenum_link(1) . '%_%',
'format' => 'page/%#%',
'current' => $current_page,
'total' => $total_pages,
'prev_text' => 'Prev',
'next_text' => 'Next'
));
echo '</div>';
}
?>
<div class="googleFooterBanner">
</div>
<?php get_footer(); ?>
</section><!--end of content Wrapper-->