Noindex for pagination pages. Yoast SEO open

Noindex for pagination pages. Yoast SEO

Approved. Code works!
This is exactly the working code that is verified by the moderator or site administrators
//noindex for pagination pages
add_filter( 'wpseo_robots', 'my_robots_func' );
function my_robots_func( $robotsstr ) {
	if ( is_page() && is_paged() ) {
		return 'noindex,follow';
	}
	return $robotsstr;
}
0

More

Leave a Reply

Your email address will not be published. Required fields are marked *

How many?: 22 + 22

lil-code© | 2022 - 2024
Go Top
Authorization
*
*
Registration
*
*
*
*
Password generation