For the improved filter, remove the two lines described above in post 6.
Add to the SQL query
and pages_id in (" . EZPAGES_SIDEBOX_FILTER . ")
or
and pages_id in (" . EZPAGES2_SIDEBOX_FILTER . ")
to get
PHP Code:
    $page_query $db->Execute("select * from " TABLE_EZPAGES " where status_sidebox = 1 and sidebox_sort_order > 0 and pages_id in (" EZPAGES_SIDEBOX_FILTER ") order by sidebox_sort_order, pages_title");
    if (
$page_query->RecordCount()>0) { 
Make a new file /includes/datafiles/extra_datafiles/ezpages_sidebox_filters.php, with content
PHP Code:
define('EZPAGES_SIDEBOX_FILTER''1,3,5,7,11');
define('EZPAGES2_SIDEBOX_FILTER''2,4,6,8,9,10');