How to add nofollow site-wide

One part of removing your site from Google is to add <meta name=”robots” content=”noindex,follow” /> to every page. If you can edit the theme code then you could just add this to header.php (and any variants). You could also use a plugin. I’ve not tested any, but https://wordpress.org/plugins/simple-robots-meta/ claims to do the job simply.

How to add nofollow on all external links without plugin?

This is how I would do it : 1/ create a filter to access the post content before it’s displayed on page. See http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content 2/ Inside your fonction called (ie : my_the_content_filter in the example from the Codex) adapt this code : https://stackoverflow.com/questions/5037592/how-to-add-rel-nofollow-to-links-with-preg-replace Cheers !

How to set all external links to a certain domain to “nofollow”?

Assuming you are targetting links in post content, I’d say something like that : add_filter( ‘the_content’, ‘wpse_254317_nofollow’ ); /** * Add rel nofollow according to a predefined domain * to links in content * @param $content * @link http://stackoverflow.com/a/4809181/1930236 * @return mixed */ function wpse_254317_nofollow( $content ) { $my_folder = “https://google.com”; preg_match_all( ‘~<a.*>~isU’, $content, $matches … Read more

A plugin for having rel=”nofollow” in posts?

you can add a filter in your functions.php add // Nofollow in content add_filter(‘the_content’, ‘my_nofollow’); function my_nofollow($content) { //return stripslashes(wp_rel_nofollow($content)); return preg_replace_callback(‘/<a[^>]+/’, ‘my_nofollow_callback’, $content); } function my_nofollow_callback($matches) { $link = $matches[0]; $site_link = get_bloginfo(‘url’); if (strpos($link, ‘rel’) === false) { $link = preg_replace(“%(href=\S(?!$site_link))%i”, ‘rel=”nofollow” $1’, $link); } elseif (preg_match(“%href=\S(?!$site_link)%i”, $link)) { $link = preg_replace(‘/rel=\S(?!nofollow)\S*/i’, ‘rel=”nofollow”‘, … Read more

Editing the Comment Reply Link

functions.php: function remove_nofollow($link, $args, $comment, $post){ return str_replace(“rel=”nofollow””, “”, $link); } add_filter(‘comment_reply_link’, ‘remove_nofollow’, 420, 4);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)