增加收录:给WordPress文章页面添加description描述标签-WordPress主题

摘要:做为wordpress站长,我们都知道为wordpress安装seo优化插件,比如”All in One SEO Pac…

做为wordpress站长,我们都知道为wordpress安装seo优化插件,比如”All in One SEO Pack”可以自定义设置所有页面的关键字(keyword)、描述(description)的,但是我们有没有一种小而精的方法可以实现优化需求呢,现在大挖给大家推荐一个可以快速且自动为文章设置自动描述的方法,代码如下。

将脚本添加到当前wordpress主题的Functions.php文件中,

此方法是此文章中的前300个字符为位文章的描述标签内容,其中默认是300字符长度,我们可以根据需要调整长度。

来源:http://www.wazhuti.com/2318.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_13184.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?