• harukochi

    (@harukochi)


    I have categories list with hierarchy. I want to exclude some categories, I put some term_ids like “1,15,16” into box that “Exclude these categories (separated by commas):”, but excluding is not worked.
    I think that the excluding function is not work correctly in hierarchical categories.
    Regards,

Viewing 1 replies (of 1 total)
  • Thread Starter harukochi

    (@harukochi)

    I tried the fix.

    *** collapscatlist.php.org 2017-11-07 17:04:32.612482622 +0900
    — collapscatlist.php 2017-11-08 09:44:52.049565177 +0900
    ***************
    *** 379,385 ****
    }
    }
    }
    ! for ($i=0; $i<count($categories); $i++) {
    if ($inExclude==’exclude’ && !empty($inExclusionArray)) {
    if (in_array($categories[$i]->slug, $inExclusionArray) OR
    in_array($categories[$i]->term_id, $inExclusionArray)) {
    — 379,387 —-
    }
    }
    }
    !
    ! $categories = array_values($categories);
    ! for ($i=(count($categories)-1); $i>=0; $i–) {
    if ($inExclude==’exclude’ && !empty($inExclusionArray)) {
    if (in_array($categories[$i]->slug, $inExclusionArray) OR
    in_array($categories[$i]->term_id, $inExclusionArray)) {

Viewing 1 replies (of 1 total)
  • The topic ‘Excluding Some Categories are not worked.’ is closed to new replies.