LoginSignup
0
0

More than 5 years have passed since last update.

記事抜粋の文字数とか変更

Last updated at Posted at 2015-08-20

フィルターフック使用。
function.phpに下記記述。

hoge
<?php

// 抜粋の長さを変更
function change_excerpt_length($length) {   
    return 50;
}   

// ...の文字を消す
function change_excerpt_more($more) {
    // return ' ... ';
    // return '続きを読む';
    return '';
}

add_filter('excerpt_length', 'change_excerpt_length');
add_filter('excerpt_more', 'change_excerpt_more');

?>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0