Forum Moderators: coopster

Message Too Old, No Replies

Make catergory index nofollow

allow wordpress category to be index nofollow

         

cheaperholidays

8:06 am on Jan 3, 2008 (gmt 0)

10+ Year Member



Hi Everyone and happy new year to you.

Please ignore got it working now...

We have this in our header

<?php
if((is_home() && ($paged < 2 )) ¦¦ is_single() ¦¦ is_page()){
echo '<meta name="robots" content="index,follow" />';
} else {
echo '<meta name="robots" content="noindex,follow" />';}
?>

What i want to do is make the category pages index no follow.

Is there a way the above code can be amended.

Thanks in advance

Pete

[edited by: cheaperholidays at 8:45 am (utc) on Jan. 3, 2008]

cheaperholidays

8:24 am on Jan 3, 2008 (gmt 0)

10+ Year Member



Hi Again

tried this but got error

<?php
if((is_home() && ($paged < 2 )) ¦¦ is_single() ¦¦ is_page()){
echo '<meta name="robots" content="index,follow" />';elseif (is_category())
echo '<meta name="robots" content="index,nofollow" />';
} else {
echo '<meta name="robots" content="noindex,follow" />';}
?>

Ps how do your edit your own post

Pete

Habtom

8:28 am on Jan 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is the error you are getting?

Ps how do your edit your own post

<- Owner edit at the left side of the box

cheaperholidays

8:44 am on Jan 3, 2008 (gmt 0)

10+ Year Member



Hi Thanks

Got it working now

Pete