WORDPRESS的SEO搜寻最佳化,去除文章的作者名和日期的连结

有一些比较便宜的wordpress主题。就是没有seo优化的wordpress的主题。
会有一些缺陷,像Twenty Ten主题就有此问题。
其中一个就是在,日期级作者,会有连结。
这是多余的,会造成重复的seo
WORDPRESS的SEO搜寻最佳化,去除文章的作者名和日期的连结
框起来的地方,会有连结!a116
所以只好使用以下代码解决。
开启Twenty Ten主题的functions.php加入以下代码
[cc lang="php"]function twentyten_posted_on() {printf( __( 'Posted on %2$s by %3$s', 'twentyten' ),'meta-prep meta-prep-author',sprintf( ' %3$s',get_permalink(),esc_attr( get_the_time() ),get_the_date()),sprintf( '%3$s',get_author_posts_url( get_the_author_meta( 'ID' ) ),esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ),get_the_author()));}[/cc]
其他主题不见得适用,但这是一个重要概念

评论 (0)

此处尚未发表评论

留言

  1. 以游客身份发表评论。注册登入到您的帐户。
附件 (0/ 3)
分享您的位置