Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In the script below i'm trying to pass category IDs to exclude, however, the category list still includes children of these categories and i can't figure what's wrong.

Can anyone see what I could be doing wrong in this script?

$cat_args = get_option('show_empty_cats') ? 'exclude='.ce4_cat().'&exclude_tree='.ce4_cat().'&hide_empty=0' : 'exclude='.ce4_cat().'&exclude_tree='.ce4_cat().'';$categories=get_categories($cat_args);

//$cat_args = 'exclude=1,31&exclude_tree=1,31&hide_empty=0';
$categories = get_categories($cat_args);
for each..., etc
share|improve this question
    
try phrasing it to an array of args –  Bainternet Feb 8 '11 at 10:38
    
What are you getting back from ce4_cat()? –  t31os Feb 8 '11 at 15:31
add comment

1 Answer

up vote 0 down vote accepted

Add before your code: $test_me = ce4_cat(); var_dump($test_me);

Edit: Easier to read version:

$test_me = ce4_cat();
echo '<pre>';
print_r($test_me);
echo '</pre>';

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.