Recent Topics

1 Feb 06, 2012 15:00    

Would it be hard to add an "exclude these categories" field in the category widget ?

That's a missing feature.We have "ALL", "THESE", but not "All except these"

2 Feb 08, 2012 06:02

It's easy. Just edit the "cat_line" function in _coll_category_list.widget.php

replace this

if( !isset($cat_array) )
{
	$cat_array = array();
}

with

if( !isset($cat_array) )
{
	$cat_array = array();
}

$exclude_cats = sanitize_id_list($this->disp_params['exclude_cats'], true);
if( in_array( $Chapter->ID, $exclude_cats ) )
{    // Cat ID is excluded, skip it
	return;
}

Then add the setting

'exclude_cats' => array(
		'type' => 'text',
		'label' => T_('Exclude categories'),
		'note' => T_('A comma-separated list of category IDs that you want to exclude from the list.'),
	),

Just added it to v5 :)


Form is loading...