Help us understand the problem. What is going on with this article?

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

More than 5 years have passed since last update.

はじめに

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

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした