Forked from robwent/remove-woo-noindex-public-pages.php
Created
March 9, 2022 12:57
-
-
Save sumonst21/2a82e367a51553aaaaa9e587202ba515 to your computer and use it in GitHub Desktop.
Removes WooCommerce noindex robots tag on public pages
This file contains hidden or 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
function YOURPREFIX_remove_wc_account_page_noindex(){ | |
if (!is_user_logged_in()) { | |
remove_action( 'wp_head', 'wc_page_noindex' ); | |
} | |
} | |
add_action( 'init', 'YOURPREFIX_remove_wc_account_page_noindex' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment