Curious About no in...
 
Notifications
Clear all

Curious About no index function in Bender Theme

2 Posts
1 Users
0 Reactions
415 Views
(@nootkan)
Posts: 34
Trusted Member
Topic starter
 

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;

        }
    }

This topic was modified 11 months ago 2 times by nootkan
 
Posted : April 21, 2025 19:12
(@nootkan)
Posts: 34
Trusted Member
Topic starter
 

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');

 
Posted : April 22, 2025 06:32