Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Preventing Google from indexing specific categories


 
Prev Previous Post   Next Post Next
  #1  
Old Jan 25, 2012, 03:33 PM
vinceesq
 
32 posts · Jun 2011
Preventing Google from indexing specific categories

Hello,

I need to prevent google from indexing specific categories with all their posts , and I found this code that, obviously, worked for many people. The code needs to be placed into header.php file between <head> and </head> tags. Here's the code

<?php if ( is_category('3') || in_category('3') ) {
echo '<meta name="robots" content="noindex">';
}

However, when I did it, the home page returned an error. It sounds like no other codes are allowed between the two tags in Atahualpa.

Is there another way to implement this code? Or, how do I indicate in Atahualpa which categories are noindex? I need to exclude 4 categories with all the posts from being indexed. Or, is there a way to place a meta tag that would prevent Google from indexing specific categories?

Thanks a lot for your help.

Vince
 

Bookmarks

Tags
categories, header, indexing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a Post List for Specific Categories on a Page chycoo Page & Category Menu Bars 1 Jun 15, 2011 02:23 AM
How do I display posts excerpts from specific categories on the homepage? aeerol Center area post/pages 0 Jun 12, 2010 04:32 PM
Permalinks and google indexing of product pages newbonic eCommerce & Atahualpa 0 Feb 11, 2010 04:01 AM
Side bars on specific categories kashanti Sidebars & Widgets 1 May 25, 2009 05:07 AM


All times are GMT -6. The time now is 07:52 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.