有一些比較便宜的wordpress主題。就是沒有seo優化的wordpress的主題。
會有一些缺陷,像Twenty Ten主題就有此問題。
其中一個就是在,日期級作者,會有連結。
這是多餘的,會造成重複的seo
框起來的地方,會有連結!
所以只好使用以下代碼解決。
開啟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]