Category selection and exclusion not working in a widget

enter image description here
// Convert comma separated string to array for use in WP_Query.
$category_include = $instance['cat_include'];
if ( $category_include ) {
    $category_include = explode( ',', $instance['cat_include'] );
} else {
    $category_include = array();
}

// Convert comma separated string to array for use in WP_Query.
$category_exclude = $instance['cat_exclude'];
if ( $category_exclude ) {
    $category_exclude = explode( ',', $instance['cat_exclude'] );
} else {
    $category_exclude = array();
}

when I am trying to include/exclude the category I am not getting the required success. I believe that the there is some bug in the code.

Please let me know if I need to provide the additional information?

Read more here:: Category selection and exclusion not working in a widget

Leave a Reply

Your email address will not be published. Required fields are marked *