We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum
using count with content_custom
I'm using content_custom with a count variable to show a limited subset of some content. I'm also using a template with a repeater inside. I'm essentially trying to grab the first 8 items that have anything at all in this repeater. However the count, as expected I guess, seems to be including results that don't contain that criteria, so it only actually brings back one or two of the results I need.
<?php perch_content_custom('portfolio', array( 'template' => 'award.html', 'count' => 8, )); ?>
Adding a filter to check that the item isn't empty simply returns nothing at all (I'm assuming because repeaters don't count as a single field to filter on, so nothing comes back as a match):
<?php perch_content_custom('portfolio', array( 'template' => 'award.html', 'count' => 8, 'filter' => 'work_awards', 'match' => 'neq', 'value' => "", )); ?>
Has anyone else ever tried doing something like this? How did you get around it?
Cheers for any pointers,
Want to reply to this thread?Login with Perch