內容簡介
這個外掛在儲存文章時會為文章中的外部連結添加 rel=”nofollow” 的屬性。外掛還提供了一個方便的複選框,可用於排除文章不受外掛的作用。
已有 rel 屬性的連結會被忽略,因此您可以設置某些 dofollow。
默認情況下,該外掛僅對文章起作用,不包括頁面或其他自訂文章類型。要包括其中的(某些)文章類型,使用以下代碼(例如將其放入您的主題的 functions.php 中):
add_filter( 'rnf_post_types', function( $post_types ) {
return array( 'post', 'page' ); #指定所需的所有文章類型,用逗號分隔
});
外掛標籤
開發者團隊
原文外掛簡介
When a post is saved, the plugin adds the rel=”nofollow” attributes to post external links. The plugin also provides an apt checkbox to exclude a post from plugin’s action.
Links which already have a rel attribute are just ignored, so you can set some dofollows are well.
By default, the plugin will only act on posts, no pages or other custom post types. To include (some of) them, use a code like the following, for ex. by putting it in your theme’s functions.php:
add_filter( 'rnf_post_types', function( $post_types ) {
return array( 'post', 'page' ); #specify all desired CPTs, comma-separated
});
