Noindex for newsletter endpoint pages
-
Hi, I was able to add a robots noindex header to all MailPoet subscription pages with this code snippet:
add_filter( 'wp_headers', function( $headers ) { // Add noindex for feeds. if ( is_singular( 'mailpoet_page' ) ) { $headers['X-Robots-Tag'] = 'noindex, noarchive, nosnippet, follow'; } return $headers; } );
However, this does not add the same header to Newsletter pages/endpoints style
/?mailpoet_router&endpoint=view_in_browser&action=view&data=
xxxIs there an easy way to detect those kind of queries or do I need to test for
$_GET["mailpoet_router"]
?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Noindex for newsletter endpoint pages’ is closed to new replies.