Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Actually

    I think the issue is in the section:

    $excluded_categories = array_map('intval', explode(' and ', $excluded_categories));
    if ( !empty($cat_array) ) {
    $excluded_categories = array_diff($excluded_categories, $cat_array);
    $posts_in_ex_cats_sql = '';
    }

    When I use the parameter like this 1,2,3 and by pass the above section, everything works fine IN or NOT IN

    Again, Just my thoughts, not a solution for production.

    Disclaimer(s)
    1. I know this is bad form
    2. This issue might be resolved in another forum
    3. This is not a solution just a thought

    I’m using 2.7 and I changed line #887 of link-template.php

    TO:
    $posts_in_ex_cats_sql = ” AND tt.taxonomy = ‘category’ AND tt.term_id IN (” . implode($excluded_categories, ‘,’) . ‘)’;

    FROM:
    $posts_in_ex_cats_sql = ” AND tt.taxonomy = ‘category’ AND tt.term_id NOT IN (” . implode($excluded_categories, ‘,’) . ‘)’;

    It now works as a include cats parameter.

Viewing 2 replies - 1 through 2 (of 2 total)