카테고리 링크가 카테고리 페이지를 가리키는 대신 '#'을 가리 키도록하기 위해 아래 코드를 올바르게 조정할 수없는 것 같습니다. 어떤 제안이라도 대단히 감사하겠습니다!
if ( ! function_exists( 'theme_framework_post_cat' ) ) :
function theme_framework_post_cat() {
if ( 'post' == get_post_type() ) {
$categories_list = get_the_category_list( esc_html__( ', ', 'theme' ) );
if ( $categories_list && theme_framework_categorized_blog() ) {
printf( '<span class="cat-links">' . esc_html__( '%1$s', 'theme' ) . '</span>', $categories_list );
}
}
}
endif;
당신은 시도 할 수 있습니다:
$categories_list = strip_tags(get_the_category_list( esc_html__( ', ', 'theme' ) ));
strip_tags ()는 get_the_category_list WP 함수가 반환하는 모든 태그를 제거하는 PHP 함수입니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다