wordpressでfunction.phpを編集しています。
2点困ったことがあります。
1.管理画面にアイキャッチ画像を登録する画面が出てこない。
2.続きを読むのところに、[...]をなくす記述をしているはずなのに、表記される。
原因を教えて下さい。PHP,Wordpressは初心者なので、出来るだけ丁寧に教えていただけると助かります。
<!--ソースコードはいかの通りです。-->PHP
1// 絶対パス→相対パス 2 3class relative_URI { 4 function relative_URI() { 5 add_action('get_header', array(&$this, 'get_header'), 1); 6 add_action('wp_footer', array(&$this, 'wp_footer'), 99999); 7 } 8 function replace_relative_URI($content) { 9 $home_url = trailingslashit(get_home_url('/')); 10 return str_replace($home_url, '/', $content); 11 } 12 function get_header(){ 13 ob_start(array(&$this, 'replace_relative_URI')); 14 } 15 function wp_footer(){ 16 ob_end_flush(); 17 } 18} 19new relative_URI(); 20 21// アイキャッチ画像を有効にする。 22add_theme_support('post-thumbnails'); 23 24// 記事の画像にclassを出力する 25add_filter('get_image_tag_class', function($class){ 26 return $class . 'eye-catch'; 27}); 28 29// 記事の内容80文字を抜粋する 30function custom_excerpt_length($length) { 31 return 80; 32} 33add_filter('excerpt_length', 'custom_excerpt_length', 999); 34 35// 続きを読むを非表示にする 36function new_excerpt_more($more) { 37 return ' ... '; 38} 39add_filter('excerpt_more', 'new_excerpt_more'); 40 41