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


  #1  
Old Jan 25, 2012, 03: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, 04:59 PM
juggledad's Avatar
juggledad
 
23,765 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, 07: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, 10: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, 03:57 AM
juggledad's Avatar
juggledad
 
23,765 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 06: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 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 12:30 AM.


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