Excluding Specific Categories
Osga, I believe the only change you'll need to make is to add the 'where' clause as shown here:
// load records
list($articlesRecords, $articlesMetaData) = getRecords(array(
'tableName' => 'articles',
'where' => ' category NOT LIKE "%YourCategoryName%" ',
'limit' => '9',
'loadUploads' => '0',
'orderBy' => 'date DESC',
You'll need to edit YourCategoryName to match the actual category to be excluded.
That code should work if your list of categories is in the same table.
If your list of categories is in a separate table (i.e. Get options from database), try using the record number instead of the label.
For example, if the record number for the external category to exclude is record number 4, then:
'where' => 'category NOT LIKE "4" ',
See if that works.
Hi Deborah... we finally got this work with a little playing around, Note the "CategoryNum" as opposed to the suggested "category" in the statement (make a mental note of that)...
now the question is: Do you know the syntax for excluding more than 1 category?
'where' => ' categoryNum NOT LIKE "9" ',
thanks for all ur help so far!