So I recently received a warning from google about pages not being indexed due to a no index tag in my head meta tags. I realize that not indexing categories is good as google considers them duplicate content but there are also normal pages created like faq that is getting a no index tag also. Â
Curious how I would allow these pages to be labeled as follow instead of nofollow which I assume is the reason for the no index tags.Â
After doing some research I discovered the following functions in my theme, I assume I could remove it but than the categories would be indexed also.Â
Looking for some guidance on how to ensure my normal pages are indexed but not the categories, register, publish, login etc which are marked as nofollow now.
if(!function_exists('bender_nofollow_construct')) {
/**
* Hook for header, meta tags robots nofollos
*/
function bender_nofollow_construct() {
echo '<meta name="robots" content="noindex, nofollow, noarchive" />' . PHP_EOL;
echo '<meta name="googlebot" content="noindex, nofollow, noarchive" />' . PHP_EOL;
}
}
if( !function_exists('bender_follow_construct') ) {
/**
* Hook for header, meta tags robots follow
*/
function bender_follow_construct() {
echo '<meta name="robots" content="index, follow" />' . PHP_EOL;
echo '<meta name="googlebot" content="index, follow" />' . PHP_EOL;
}
}
So I figured it out. Just had to open page.php and changeÂ
osc_add_hook('header','bender_nofollow_construct');
toÂ
osc_add_hook('header','bender_follow_construct');
