Forums
-
- Forum
- Posts
-
- Installation
- 28,034
- Troubleshooting
- 61,259
- Themes
- 10,269
- Plugins
- 15,090
- Requests & Feedback
- 14,727
- Showcase
- 3,245
-
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 -->';
}
}
?>
See also: WordPress.org • bbPress.org • BuddyPress.org • Matt • Blog RSS