skip to Main Content

WordPress Code Snippets


How to Set Default Meta Robots for Archive Pages in AIOSEO

Use this code to add noindex or follow directives to archive pages, giving you control over how these pages are indexed by search engines.

add_filter( 'aioseo_robots_meta', function ( $robots ) {
    if ( is_archive() ) {
        $robots['noindex'] = true;
    }
    return $robots;
});

I’m a WordPress developer with 10+ years of experience in WooCommerce and custom plugins. I combine technical expertise with design flair to help you create standout, user-friendly websites. Let’s transform your digital presence!

Best WordPress Hosting
Back To Top