I must admit that I hadn’t noticed that there was any recent updates. I’m not responsible for maintaining the site where the plugin was used and haven’t used the plugin since. I took a quick look at the current 1.1.3 version and compared it to the 1.1.0 version which my mod is based on. The code seems to be heavily reworked and I’m afraid I don’t have the time right now to implement the change and test if it still works. If you are comfortable editing PHP you may try it yourself.
You need to edit the init.php file starting on line 318. Code below. I’m including some context, starting from line 304, so you can see where I put my code.
} else { // let's dig deeper into more specific visibility rules
if( ! empty( $logic['tax'] ) ) {
if(is_singular()){
if(isset($logic['tax']['category_single']) && !empty($logic['tax']['category_single'])){
$cat = get_the_category();
if(!empty($cat)){
foreach($cat as $c){
if($c->taxonomy === 'category' && isset($logic['tax']['category_single'][$c->slug])){
$visible = true;
break;
}
}
}
}
// ------------------------------------------------
// Test for custom taxonomies
// added by Tomas Eklund, Daladatorer on 2017-07-03
$post_taxonomies = get_post_taxonomies(get_the_ID());
foreach ($post_taxonomies as $post_taxonomy_name) {
if (isset($logic['tax'][$post_taxonomy_name])) {
$logic_term_slug = array_keys($logic['tax'][$post_taxonomy_name])[0];
$post_terms = get_the_terms(get_the_ID(), $post_taxonomy_name);
if ($post_terms) foreach ($post_terms as $post_term) {
if ($post_term->slug === $logic_term_slug) {
$visible = true;
}
}
}
}
// End of test for custom taxonomies
// ------------------------------------------------
} else {