나는 모든 게시물을 내용으로 가득보고 싶기 때문에 발췌 기능을 제거하거나 무의미하게 만들고 싶습니다. 나는 주제가 그 발췌가 그 선에 있는지 확인하기 위해 약간의 추적을 가지고 있다고 생각한다. 그래서 그것은 반드시 존재해야한다.워드 프레스 테마 발췌 기능 제거 - thao 스튜디오 테마
function excerpt($limit) {
$excerpt = explode(' ', get_the_excerpt(), $limit);
if (count($excerpt)>=$limit) {
array_pop($excerpt);
$excerpt = implode(" ",$excerpt).'...';
} else {
$excerpt = implode(" ",$excerpt);
}
$excerpt = preg_replace('`\[[^\]]*\]`','',$excerpt);
return $excerpt;
}
function content($limit) {
$content = explode(' ', get_the_content(), $limit);
if (count($content)>=$limit) {
array_pop($content);
$content = implode(" ",$content).'...';
} else {
$content = implode(" ",$content);
}
$content = preg_replace('/\[.+\]/','', $content);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
return $content;
}
나는이 두 줄의 코드 만 관련되어 있습니다. 나는 어디에서 $ 한계가 왔는지 알지 못한다. 나는 모든 주제와 관련된 PHP, 발견 결과를 찾지 못했다. 도와주세요. 고맙습니다.
테마의 발췌 부분 대신 전체 내용을 표시 하시겠습니까? –
예! 가능하면! 가능한 한 오리지널을 발췌하여 보여 주려고했으나 실패했습니다. –
테마에서 the_content()를 사용하지 않는 이유는 무엇입니까? –