Forum

Thread tagged as: Question, Problem, Blog

Perch Blog Custom Multi Filter

Having an issue with perch_blog_custom when using multiple filters. Below was working until recently, now only works with one filter.

            <?php
                perch_blog_custom(array(
                'sort'=>'postDateTime',
                'sort-order'=>'RAND',
                'template'=>'blog/featured-posts.html',
                'count'=>3,
                'filter' => array(
                array(
                'filter' => 'postSlug',
                'match' => 'neq',
                'value' => perch_get('s'),
                ),
                array(
                'filter' => 'featured',
                'match' => 'eq',
                'value' => 'yes'
                )
                )
            )); ?>

Seems to be the same issue as raised in this thread.

Diagnostics...

Perch: 3.0.2, PHP: 7.0.10, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $, with PDO
Server OS: WINNT, apache2handler
Installed apps: content (3.0.2), assets (3.0.2), categories (3.0.2), jw_activity_log (1.0.1), perch_blog (5.5.1), perch_forms (1.9), perch_gallery (2.8.8)
App runtimes: <?php $apps_list = [ 'perch_forms', 'perch_gallery', 'perch_blog', ];
PERCH_LOGINPATH: /perch
PERCH_PATH: C:\Users\Mark\Documents\Web Design Local\host\katephoenix\perch
PERCH_CORE: C:\Users\Mark\Documents\Web Design Local\host\katephoenix\perch\core
PERCH_RESFILEPATH: C:\Users\Mark\Documents\Web Design Local\host\katephoenix\perch\resources
Image manipulation: GD
PHP limits: Max upload 8M, Max POST 8M, Memory: 128M, Total max file upload: 8M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
HTTP_HOST: katephoenix
DOCUMENT_ROOT: C:/Users/Mark/Documents/Web Design Local/host/katephoenix
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Mark Phoenix

Mark Phoenix 0 points

  • 4 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

The first thing to do would be to update to the latest version of Perch and check to see if the issue still exists.

Duncan Revell

Duncan Revell 78 points
Registered Developer

If the latest version doesn't help, similar issues in other apps have been fixed by adding


'filter-mode' => 'ungrouped',

To your options array.

I can't guarantee this will work with Blog, but maybe worth a go...

Hurrah, that's fixed it. Thanks Duncan.