Baidu When using the site command to query the website collection, Blueleaf found that emlog The number of tag pages included is considerable. However, although there are many, the emog tag does not have an independent description description, but reads the description description of the website in a unified way Seo optimization Very unfriendly. In order to solve this problem, Lanye will share it with you Emlog template Tag seo optimization adds description function method and code, and emlog tag adds setting description description description method and code.
Emlog template The tag seo optimization addition describes the function method and code. Please follow the steps shared by Blueleaf to implement the function of adding and setting the description of the emlog tag.
1. Enter the currently used Template Folder, find the configuration file options for template settings php If not, copy it from the default template, open the options.php file with an editor, and add the following code as required.
'tagDesc'=>array( 'labels'=>'tpl-head', 'type'=>'text', 'name'=>'Label description', 'depend'=>'tag', 'description '=>' After selecting a tag, set the description of the tag to facilitate seo optimization. ' ),
2. Find the header.php file under the current template folder, open it with an editor, and add the following code under the title tag.
<? php if(isset($tag)){$site_description = _g('tagDesc.'. $Tag_Model->getIdFromName($tag));}?>
According to the above method, the emlog template tag seo optimization can be realized, and the description description function can be added to enhance the emlog tag seo optimization. For webmasters who do not know much about template settings, they can download the template shared by Blueleaf, view the template setting plug-ins in the template, and learn to modify by comparing with examples.