Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Keep spiders out of forum categories?


Simon99
Member

@simon99

is_forum() doesn’t take any arguments, so I believe you’d have to use the global var $forum, like so:

<?php
/*
Plugin Name: noindex stuff
*/

add_action('bb_head', 'my_add_noindex_tag');
function my_add_noindex_tag() {
global $forum;
if($forum->forum_id == 3) {
echo '<meta name="robots" content="noindex" />';
}
else {
echo '<!-- please do index -->';
}
}
?>

Skip to toolbar