Created
April 23, 2018 22:16
-
-
Save deeman/aee64671449c687a6ad4a88ff0bb272c to your computer and use it in GitHub Desktop.
SEO & WooCommerce - Prevent indexing "Order by"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_head', 'cp_prevent_indexing_orderby' ); | |
if(!function_exists('cp_prevent_indexing_orderby')){ | |
function cp_prevent_indexing_orderby () { | |
if (isset($_GET['orderby'])){ | |
echo '<meta name="robots" content="noindex, nofollow">'; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment