mbcreation

Yoast no index for all query string

Apr 28th, 2015
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.15 KB | None | 0 0
  1. add_filter('wpseo_robots', function($robots) {
  2.  
  3.     if( strpos($_SERVER['REQUEST_URI'],'?') !== false )
  4.     return 'noindex,follow';
  5.  
  6.     return $robots;
  7.  
  8. });
Advertisement
Add Comment
Please, Sign In to add comment