I am trying to show a widget only in specific pages with Widget Logic plugin in Wordpress but i cant make it work in both (Line2 and Line3) situations. If I try each part of the code is working great.
$cats = array('test1','test2','test3');
global $post; return (in_array(1317, get_post_ancestors($post))) || is_tax('categories', $cats);
global $post; return is_single() && has_term($cats, 'categories', $post->ID);