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


  #1  
Old Jan 25, 2012, 04:33 PM
vinceesq
 
32 posts · Jun 2011
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
  #2  
Old Jan 25, 2012, 05:59 PM
juggledad's Avatar
juggledad
 
23,576 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
look at your code, you are missing something (hint: look at the beginning and the end)
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Jan 25, 2012, 08:36 PM
vinceesq
 
32 posts · Jun 2011
Quote:
Originally Posted by juggledad
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.
  #4  
Old Jan 26, 2012, 11:23 PM
vinceesq
 
32 posts · Jun 2011
Quote:
Originally Posted by vinceesq
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.
  #5  
Old Jan 27, 2012, 04:57 AM
juggledad's Avatar
juggledad
 
23,576 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Jan 27, 2012 at 07:08 AM.

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 03:23 AM
How do I display posts excerpts from specific categories on the homepage? aeerol Center area post/pages 0 Jun 12, 2010 05:32 PM
Permalinks and google indexing of product pages newbonic eCommerce & Atahualpa 0 Feb 11, 2010 05:01 AM
Side bars on specific categories kashanti Sidebars & Widgets 1 May 25, 2009 06:07 AM


All times are GMT -6. The time now is 04:18 PM.


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