Change conditional WP headlines on individual stories, and rest of the page

The heading tag is not used best in the initialization of WordPress. With this, it is not effective for SEO. I thought about a good way for SEO in an easy change to apply heading.

How to use of h1 and h2 tag in the WordPress initialization.

"Name of the blog" is specified for the h1 tag in the initialization of WordPress, and "Explanation of the blog" is not used for heading. And, it is usual that "Title of an individual article" is h2 tag. With this, it cannot be said it is effective for SEO. Even the theme with an individual article that uses single.php seems to be similar.

The h1 tag of individual article was specified from "Title of individual article".

I used "Explanation of the blog" in the h1 tag with index.php in pages other than an individual article so far and it used below the h3 tag specifying "Title of an individual article" for the h2 tag in the article.

"Title of an individual article" was specified in the h1 tag, and in the page of an individual article, nothing was specified for the h2 tag, and it specified below the h3 tag in the article. This : to the display of the individual article page It achieved it by using single.php. The h2 tag was not used, flew on the individual article page, and it was anxious that it was h3 tag. I was not able to do below the h3 tag though you might reduce, display the figure of tag one by one, and use the h2 tag.

The condition was separated by using is_single() that specified an individual article.

Single.php was not used, only header.php was changed, and this was made the method of diverging in the condition and changing the h1 tag this time.

Finally, "Name of the blog "Title of an individual article" +" was specified for the h1 tag in an individual article specifying "Explanation of the blog "Name of the blog" +" for the h1 tag excluding an individual article. It is as usual to specify below the h3 tag specifying "Title of an individual article" for the h2 tag in the article. If it is this, it must be considerably advantageous for SEO.

Here, it is necessary to examine the amount of the content and the character closely and to set it to "Name of the blog", "Explanation of the blog", and "Title of an individual article". I think that I come to be able to set it well if SEO is always considered.

To the condition branching part

<?php if(is_single()): ?>

It was used the specification named is_single() only of an individual article. An actual script is as follows.

<h1><?php if(is_single()): ?>
<span class="storytitle_s"><?php the_title(); ?></span>
<span id="header_s"><a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a></span>
<?php else: ?>
<span id="header"><a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a></span>
<span class="description"><?php bloginfo('description') ?></span>
<?php endif; ?>
</h1>

Here, because the div tag of the block element cannot be used in the h1 tag of the block element, the block display is done by using the span tag of an in-line element. Single.php was able to be smartened very much unnecessary. Because the display falls into disorder considerably, it adjusts it with Style Sheet. The name of class and id must use the favorite one. I arranged what was originally.

Because the word press deleted it without permission even if it tried to write the above-mentioned "Description class =" in the article on the blog, it was not possible to write. If the check on "Illegally made it to the nest XHTML was automatically corrected" of "Contribution setting" of "Setting" was removed on the management screen of the word press, it was possible to write well.

H2 in "comments.php" is changed to h3.

Because heading the place of the comment on an individual page is h2, I think this to be amusing in h2 and the same rank of "Title of an individual article". This is changed to h3 so not important.

As "is_single()" is used and the design change is as possible as "single.php".

The h1 tag can be switched by using this "is_single()". Additionally, it is possible to use it to change in the design of an individual page and other pages. In this case, "single.php" is not necessary.