Editing Category Pages
I want to allow Search engine Robots to index my category pages, But it seems noindex,follow tags is auto add by my theme functions
I want category pages to allow indexing while keeping noindex,follow for search and 404 pages
Here's is part of them (functions.php)
/*Add noindex to low value pages*/
function add_noindex_tags(){
# Get page number for paginated archives.
$paged = intval( get_query_var( 'paged' ) );
# Add noindex tag to all archive, search and 404 pages.
if( is_archive() || is_search() || is_404() )
echo 'meta name="robots" content="noindex,follow"';
# Add noindex tag to homepage paginated pages.
if(( is_home() || is_front_page() ) $paged = 2 )
echo 'meta name="robots" content="noindex,follow"';
}
add_action('wp_head','add_noindex_tags', 4 );
?
Can someone help me edit the code?
Topic template-tags categories Wordpress
Category Web