Hello. I'm learning PW and I have a Blog page which shows blog entries and a featured blog using a field.
But if I use the $field featured_post=1, no page is showing. Using limit=1 works fine.
<?php
$blogger = $pages->find("template=blog_entry,featured_post=1"); // my template
foreach($blogger as $bloggers) {
foreach($bloggers->blog_entries as $blog_entry) { // my repeater field
echo "<div><a href='{$blog_entry->url}'><h1 class='text-xl'>{$blog_entry->title}</a></h1>";
echo "<a href='{$blog_entry->url}'><img src='{$blog_entry->blog_main_image->getCrop('blogsmall')->url}' alt='{$blog_entry->blog_main_image->description}'></a>";
echo "{$sanitizer->truncate($blog_entry->blog_text , 100, array('type'=>'sentence', 'keepFormatTags'=>false /* true or false */))}";
echo "<p class='test_to_show_value_of_featured_filed'>{$blog_entry->featured_post}</p>";
echo "</div>";
}}
?>
Any help will be very appreciated. Thanks.