Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

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:04 AM.


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