はじめに
Wordpressを使っている方の中には、SEO対策のためにAll in One SEO Packというプラグインを入れて活用されている方も多いかと思います。そのプラグインが提供する、以下のカスタムフィールドをMarsEdit等のブログソフトウェアで書き換えるためには、Wordpressの初期インストール時、及び更新時にmeta.php
の編集をしておく必要があります。その方法をメモとして残します。
_aioseop_title
_aioseop_description
_aioseop_keywords
書き換え前
(Wordpressのインストールディレクトリ)/wp-includes/meta.php
function is_protected_meta( $meta_key, $meta_type = null ) {
$protected = ( '_' == $meta_key[0] );
return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
}
書き換え後
(Wordpressのインストールディレクトリ)/wp-includes/meta.php
function is_protected_meta( $meta_key, $meta_type = null ) {
//$protected = ( '_' == $meta_key[0] );
$protected = (( '_' == $meta_key[0] ) && ( strpos($meta_key, "_aioseop") !== 0));
return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
}
大事なことなので何度でも書きますが、Wordpressの更新の度に書き換えが必要になります。私は何日かハマりました。