SHARE
TWEET

[site-reviews] add rel=nofollow to pagination links

geminilabs Oct 10th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Add `rel="nofollow"` to pagination links
  3.  * Paste this in your active theme's functions.php file
  4.  *
  5.  * @param string $pagination The pagination HTML
  6.  * @return string
  7.  */
  8. add_filter('site-reviews/paginate_links', function ($pagination) {
  9.     $pagination = str_replace('<a', '<a rel="nofollow"', $pagination);
  10.     return $pagination;
  11. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top