Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
I previously installed a Web site WordPress 2.3.2 version, because to try to keep the concept of simple Web page, plug probably only installed less than 5, which has installed all SEO pack This plug-in, although has been updated to a new version, but all SEO Pack This plug-in has been updated version, said really quite annoying, in the network to see some changes in the program of the article, also in accordance with their own needs to make some changes.
The main all SEO pack's function is to automatically help you add Title,meta keywords and description, and then to help you prohibit the search engine to some specific directory indexing, these functions can be done by themselves.
But I am also not hard-working people, just after installing all SEO pack incredibly strange, a lot of things are not come out, do not know is I will not use or how, but think about their own change, after the change all SEO pack plug stopped.
First open your header.php file before adding the following code:
<?if (is_home () | | | is_page ()) { $de scription = "When the page is displayed, the description you want is written here"; $keywords = "When the first page or pagination is displayed, the keyword you want is written here"; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP} elseif (Is_single ()) { $de scription = $post->post_excerpt; $keywords = ""; $tags = wp_get_post_tags ($post->id); foreach ($tags as $tag) { $keywords = $ Keywords. $tag->name. “, “; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP} elseif (Is_category ()) { $ Keywords = "When the directory is displayed, the keyword you want is written here"; $de scription = Category_description (); }?> <metA name= "keywords" content= "<?= $keywords?>"/> <meta Name= "description" content= "<?= $de scription?>"/>
Plus the above code, when the visit to your blog home page or pagination, will display the above keywords and description of the content (because the home page and pagination have no place to write your tag and description).
When you browse to your blog directory, the above keyword content is displayed (because there is no place to write your tag, but there are written descriptions).
When browsing to your single article, will automatically put your tag as a meta keyword content, you write in the article Description of the field automatically as a meta description of the content of your page is simple!! As for the title section, see how everyone does it, my title is the same way as the one that you add to the </head> tag before you can.
<title><?php if (Is_single ()) {the_title (); Echo ' | '; Bloginfo (' name '); else {bloginfo (' name '); Echo ' | '; Bloginfo (' description '); Wp_title (' | '); ?></title> effect You can try for yourself, also calculate quite in line with the principle of SEO, finally, do not let search engine spiders will be some of your directory as an index, so as not to cause the same situation. Content reprint: http://www.chinaxianghui.com text copyright, reprint please keep the source link.