Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

How to add noindex on certain category

edited February 2017 in Vanilla 2.0 - 2.8

How to add meta noindex on certain vanilla category?
Is there any addon to make it easier adding meta noindex on one or more vanilla category?


  • Hi, do you find a way to do that? I want to noindex an entire category too

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    You would need a small plugin for that. It should also be possible with a custom theme, but I think something like that belongs to a plugin and not a theme...

       public function base_render_before($sender, $args) {
           if (!property_exists($sender, 'CategoryID')) {
           if (!in_array($sender->CategoryID, [1,3,5])) {
                   'name' => 'robots',
                   'content' => 'noindex, follow'

    This method needs to be inside of your plugin class. It checks if the current page belongs to one and only one category (like a discussion would) and afterwards checks if this category is in a list. You would have to customize that list or replace it with a direct comparison "$sender->CategoryID != 7"

    The last piece of code adds the noindex meta tag.

  • Cool @R_J

    i will make my own plugin!

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    You can pimp it up, by making the list of CategoryIDs configurable and upload it 👍️

  • I will try it

  • Or you can duplicate/edit your theme template

      {if $Category.Name == 'this' || $Category.Name == 'that'}
Sign In or Register to comment.