Hi, Im new to processwire and the website I have this problem with was build by a third party company. I have some problems with displaying page items on the homepage with the script below. Heres the story;
I have a Newspage and I have listed about 20 news articles on this page.
Link to news page : http://dev2.aot.com.au/about/newsroom/
I have a 'chunk' script calling these news articles and displaying on the home page with the script below. http://dev2.aot.com.au/
<?php
$items = $page->find("parent=/about/newsroom, limit=12");
$numItems = count($items);
$numPerContainer = 12;
$itemx = 0;
foreach($items as $newsItem):
?>
<?php if ($itemx % $numPerContainer === 0):?>
<div id="car-dis" class="outer owl-carousel">
<?php endif; ?>
<div class="news-item">
<span class="news-date"><?php echo $newsItem->get('news_date'); ?></span>
<h3 class="news-title"><a href="<?php echo $newsItem->url; ?>"><?php echo $newsItem->title; ?></a></h3>
<p><?php echo $newsItem->news_introtext; ?>...</p><p><a class="post-cta" href="<?php echo $newsItem->url; ?>">READ MORE</a></p>
</div>
<?php if ($itemx % $numPerContainer === 11 || $itemx === $numItems): ?>
</div>
<?php endif; ?>
<?php
$itemx++; endforeach;
?>
The problem is, the home ppge news items doesn't show the latest 2 items I added recently. Does anyone know why?