LoginSignup
1
0

More than 5 years have passed since last update.

Wordpress+All in One SEO Pack+MarsEditで気をつけたいこと

Posted at

はじめに

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の更新の度に書き換えが必要になります。私は何日かハマりました。

1
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
1
0