今天换了个INOVE模板,发现其内置的mate keywords 和 meta description不起作用
解决方法: 把网站目录/wp-content/themes/inove/templates/star.php里的
<?php
if (is_home()) {
$description = $options['description'];
$keywords = $options['keywords'];
} else if (is_single()) {
$description = $post->post_title;
$keywords = “”;
$tags = wp_get_post_tags($post->ID);
foreach ($tags as $tag ) {
$keywords = $keywords . $tag->name . “, “;
}
} else if (is_category()) {
$description = category_description();
}
?>
<meta name=”keywords” content=”<?php echo $keywords; ?>” />
<meta name=”description” content=”<?php echo $description; ?>” />
删除,然后装个all-in-one-seo-pack 插件.OK
我没有删除那段代码,只是装了all-in-one-seo-pack ,也行,O(∩_∩)O
我还设置了页面的后缀名 加上 .html 伪静态,哈哈 忽悠一下搜索引擎
@云中子
晕…甘都得