いつもありがとうございます。
WordpressのテーマCustomizrでサイトを作成しています。
add_filterで"quote"や”authorを”消すことは出来たのですが、
メッセージを日本語にすると文字化けしてしまいます。
文字コードの修正などアドバイスをよろしくお願いします。
###該当のソースコード
php
1 //Default 404 content 2 $this -> content_404 = array( 3 'quote' => __( 'Speaking the Truth in times of universal deceit is a revolutionary act.' , 'customizr' ), 4 'author' => __( 'George Orwell' , 'customizr' ), 5 'text' => __( 'Sorry, but the requested page is not found. You might try a search below.' , 'customizr' ) 6 );
###試したこと...textを変更しました。
php
1//Defines post formats with no headers 2 $this -> post_formats_with_no_heading = array( 'aside' , 'status' , 'link' , 'quote' ); 3 4 //Default 404 content 5 $this -> content_404 = array( 6 'quote' => __( 'Speaking the Truth in times of universal deceit is a revolutionary act.' , 'customizr' ), 7 'author' => __( 'George Orwell' , 'customizr' ), 8 'text' => __( 'アクセスしたページは存在しません。' , 'customizr' ) 9 );
テンプレートは下記のようになっています。
php
1function czr_fn_404_content() { 2 if ( !is_404() ) 3 return; 4 5 $content_404 = apply_filters( 'tc_404', CZR_init::$instance -> content_404 ); 6 7 echo apply_filters( 'tc_404_content', 8 sprintf('<div class="%1$s"><div class="entry-content %2$s">%3$s</div>%4$s</div>', 9 apply_filters( 'tc_404_wrapper_class', 'tc-content span12 format-quote' ), 10 apply_filters( 'tc_404_content_icon', 'format-icon' ), 11 sprintf('<blockquote><p>%1$s</p><cite>%2$s</cite></blockquote><p>%3$s</p>%4$s', 12 call_user_func( '__' , $content_404['quote'] , 'customizr' ), 13 call_user_func( '__' , $content_404['author'] , 'customizr' ), 14 call_user_func( '__' , $content_404['text'] , 'customizr' ), 15 get_search_form( $echo = false ) 16 ), 17 apply_filters( 'tc_no_results_separator', '<hr class="featurette-divider '.current_filter().'">' ) 18 ) 19 ); 20 }
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/11/02 00:28
2016/11/02 01:01