Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Preventing Google from indexing specific categories (http://forum.bytesforall.com/showthread.php?t=16595)

vinceesq Jan 25, 2012 03:33 PM

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

juggledad Jan 25, 2012 04:59 PM

look at your code, you are missing something (hint: look at the beginning and the end)

vinceesq Jan 25, 2012 07:36 PM

Quote:

Originally Posted by juggledad (Post 79408)
look at your code, you are missing something (hint: look at the beginning and the end)

So, you are saying if I find out how to correct the code I should have no problem inserting it into header.php, using "HTML Inserts: Header" in Atahualpa? I am asking because it does say : Since 3.6.5 PHP code cannot be used anymore in HTML/CSS Inserts.

If it's true, can I still use the correct code by adding it directly to header.php file?

Thanks.

vinceesq Jan 26, 2012 10:23 PM

Quote:

Originally Posted by vinceesq (Post 79415)
So, you are saying if I find out how to correct the code I should have no problem inserting it into header.php, using "HTML Inserts: Header" in Atahualpa? I am asking because it does say : Since 3.6.5 PHP code cannot be used anymore in HTML/CSS Inserts.

If it's true, can I still use the correct code by adding it directly to header.php file?

Thanks.

OK, thanks for not replying!

Just so that you know I had to change the theme because of the lack of response here, and everything worked out just perfect. This is not the first time I had to change Atahualpa theme specifically because of the support I got here. I used to like Atahualpa but not any more. I will be transitioning all my sites to a different theme, but do let me know when support changes from unfriendly to friendly.

juggledad Jan 27, 2012 03:57 AM

I'm sorry you feel ignored but the moderators are volunteers. We are not paid to do this so when a paying customer of mine has a job for me I don't look at the forum as often. People who donate to me do get better response.

I gave you all you needed to solve your issue in my first response. I was trying to help you solve your issue.

Good luck picking a theme that is as flexible as atahualpa. I will close this thread.

If you decide to come back you can reopen it.


All times are GMT -6. The time now is 05:32 AM.

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