Advertisement
geminilabs

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

Oct 10th, 2019
471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  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. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement