SEO for WordPress site [Part 3] - SEO for Titles -

この記事の公開年月日:  |   How to manage titles of your WordPress Site.  | この記事のURL: https://www.rainbow-link.com/marketing_article9.htm

この記事の内容は古くなりました。過去記事として表示しております。ご注意ください。

This is a serial strory of "SEO for WordPress Site": SEO for WordPress site [Part 1] - SEO for Posts-Articles - , SEO for WordPress site [Part 2] - SEO for Pages -, and this aritcle: SEO for WordPress site [Part 3] - SEO for Title -.

In this article, we guided how to do one of the Title-SEOs for your WordPress Site, without SEO plugins. The Title-SEO is like this:

, more specific, at the first step, create a PHP-file to display titles, and the next step, add the PHP-file to your header.php.

How to create the PHP-file to display titles

  • (1)Create a new PHP-file in order to do the title-SEO. The name of the PHP-file is "header-custom.php".
  • (2)Open your "header-custom.php", copyr the below and paste it to your "header-custom.php".
  • (3)Change $Site_Title and $adding_text, and save your "header-custom.php".
  • (4)In order to use your "header-custom.php" at your "header.php", copy the line below and paste it to your "header.php". At the upper place of </head> of your "header.php".
  • To make your site-management-work easy, we recommend to line up the PHP-files for SEO like this:

You can set more conditions in each condition in "header-custom.php".

For example, at our WordPress Demo Site, we added conditions to the Front Page and to the Single Page. At the Single Page, if there are 2 words of "DEMO" or "デモ" in the titles, our $adding_text "Presented by RainbowLink Inc.( 株式会社レインボーリンク )" is displayed.

Add your specific conditions to your "header-custom.php" according to your SEO strategy.

If your WordPress displays empaty title tag in header.php,

please copy below and paste it to your functions.php.

If you can't edit functions.php, please do (A)(B) below.

(A) Open /wp-includes/general-template.php.

(B) Comment the line blow:

like this:

You have to do (A)(B) whenever you upgrade WordPress. If you use functions.php, you don't do anything when you upgrade your WordPress.

このページのURL: https://jp.Rainbow-Link.com/marketing_article9.htm


www.Rainbow-Link.com

RainbowLink Inc.