Recently, several friends have reported that the current SEO title is different from the previous website template, which may lead to the deletion of the previous collection. They asked me to modify the topic's SEO title according to their original SEO scheme, which I rejected directly. Because the blog template of the topic uses the SEO title writing method specified by the search engine, the topic template can only refer to the public, It cannot operate according to its personal S specification. Simple list Baidu A more standardized list of title SEO. For more details, please see the original text: Baidu Search Page Title Specification 。
For search users, the title is the most intuitive cognitive channel and presentation mode of the web page, and also the key factor to attract users to click the search results to enter the landing page.
In order to ensure that search users can effectively obtain the resources they need and ensure the fairness of the search results, Baidu Search has released the Baidu Search Page Title Specification to meet the needs of users stationmaster Bring more traffic and achieve win-win results.
The composition of the title is as shown in the figure: pay attention to the red area, which is the suggested title format.
Then check whether the title of this website corresponds to the SEO title suggested by Baidu:
Home page:
Classification list (list):
Article Details (Content) Page:
To sum up, all the theme templates developed by this website are in line with the SEO specification. Moreover, the theme templates have been launched for application. Throw away the newly launched ones, and there are no fewer users of other themes. If we uniformly modify the SEO prevention, we can imagine what the consequences will be.
However, for some customers, what should we do if the existing scheme is inconsistent with the previous scheme? Today, I will teach you how to modify the SEO title:
Open the header.php template. Take the koi theme as an example. The template path is:/zb_users/theme/template name/template/. After opening the template, we will find the page judgment of the zb template, and find the page you want to modify. The page judgment is as follows: the code for each theme judgment is basically the same.
zblog Page judgment code:
{if $type=='index '&&$page=='1'}/* Judge the first page*/ {if $type=='category '}/* Judge the category page*/ {if $type=='article'}/* Judge log page, not including independent page, {if $article. Type==ZC_POST_TYPE_ARTICLE} (another scheme)*/ {if $type=='page '}/* Judge independent pages*/ {if $type=='author '}/* Judge user page*/ {if $type=='date '}/* Judge the date page*/ {if $type=='tag '}/* Judge the tab*/
To modify the article page, we open the template:/zb_users/theme/koilee/template/header. php
Find the page judgment interface, as shown in the figure:
Inside the red box is the title of the article page (content page), as follows:
{$title} - {$article.Category.Name} - {$zbp->Config('koilee')->webtitle}
The foreground display effect is "website title - article category - website name" {$zbp->Config('koilee')->webtitle} Customize the SEO interface for the theme. Some themes may use {$name} For example, if we want to delete the category of the article, we just want to display the title of the website article and the website name. After modification, it is as follows:
{$title} - {$name}
Here's why it's not applicable“ $zbp->Config('koilee')->webtitle ”Interface, because this is the Koi theme argument interface, which is only applicable to Koi, and other themes will make errors. Therefore, it is recommended to use the official website title interface after modification, website settings basic settings website title, as shown in the figure below:
Save the php file after modification (the php file cannot be opened with its own txt text. It is recommended to use EditPlus , or the Application Center can search for "Theme Edit" and use it directly plug-in unit Edit), background home page, click“ [Clear cache and recompile template] ”Then open the website article page to see the effect.
Other pages are modified in the same way. You can check the page by yourself, with special instructions:
Remember before modification backups Theme template.
modify Not directly applicable to txt text editor 。
After modification Clear the theme cache and recompile the template Can take effect (if your site has enabled the development mode, this cannot be ignored, but normally it is not recommended to enable this item, and developers are only for development and testing).