Divi Display Logic – dss_content taxonomy_show 같은경우 아래와 같은 문제점이 있습니다.
1. taxonomy_term는 다중이 아닌 1개의 term 만 사용할수 있음.
2. 값이 일치 하든 안하든 true 를 반환함 divi_display_logic.php line 388
if ( ! is_wp_error( $object_terms ) ) { $found = true; foreach ( $object_terms as $term ) { if ( $term->slug == $tax_term || $term->name == $tax_term || $term->term_id == $tax_term ) { $found = true; break; } } if ( ! $found ) { $hide = true; } }
child theme 에 아래 내용을 추가한다.
function display_logic_has_taxonomy($hide , $category){ $category = preg_replace("/\s+/", "", $category); $array = explode(',', $category); foreach ($array as $term_slug ) { $hide = has_term( $term_slug , '텍소노미' ); if($hide){ break; } } return $hide; } add_filter('display_logic_has_taxonomy', 'display_logic_has_taxonomy', 10, 2);
Divi Display Logic 에서 “dss_content show_custom_filter” 를 선택한다.
show_custom_filter 값은 위의 필터명 filter_arg_1 은 보여줄 category slug 를 입력
예제 : dss_content show_custom_filter=’display_logic_has_taxonomy’ filter_arg_1=’sitepack,media-sp’
0개의 댓글