Z
Z
zarabotok2016-10-17 16:26:12
Search Engine Optimization
zarabotok, 2016-10-17 16:26:12

WP function stopped working, how to make it work?

I've been using this feature on my site for over a year.

function mayak_meta_robots () {
if (is_archive() or is_category() or is_feed () or is_author() or is_date() or is_day() or is_month() or is_year() or is_tag() or is_tax() or is_attachment() or is_paged() or is_search()) 
{
echo "".'<meta name="robots" content="noindex,nofollow" />'."\n";
}
}
add_action('wp_head', 'mayak_meta_robots');

And everything was fine, not one double. But after updating the All in One SEO Pack plugin, the function stopped working and duplicates appeared. What can block the function? In the plugin settings, the indexing section, there is not a single checkmark. I can’t manually delete duplicates for a reason (There is no reason to delete. The server does not return a 404 code, indexing is not prohibited either in robots.txt or the noindex meta tag) for example, this page: strofeyem.ru/ryby/feed)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question