Please upgrade to 2.1.x here. The 2.0 branch is no longer being updated.
Current version is 2.1.11, released 12 June.

Hidding a catagory

edited April 2012 in Vanilla 2.0 Help

Hey, how do I fully hide all discussions from one catagory from the All Discussions page?


  • 422422 Developer MVP

    If you know the id, eg #bob

    In css you could do #bob {display:none;}

    422 Real Estate Australia , now open Check it out

  • are you hiding it because you only want certain viewers to see it.
    if so you can set custom permission for the category in the dashboard for example and only let moderators view it.

  • No, I would still like everyone to see it, but the discussions made in that catagory can only be seen by clicking on the catagory on the sidebar.

  • Did you try the css? Do you feel comfortable modifying helper_functions.php? Do you know how to create a new theme? Do you know nopresnik?

  • peregrineperegrine MVP
    edited April 2012

    if you feel comfortable creating theme or modifying


    you could add the line below replacing "my-category" in lowercase to the category you want to exclude - it should hide the discussions in that category on "All discussions page", but still allow you to view those discussions when you click on the category.
    make sure it is all lower case and separate words with hyphens.

    if ((!$Sender->Category) && ($Discussion->CategoryUrlCode == "my-category")) return;

    in vanilla it a snippet will look like this below, with added line if the category to remove is called "banned appeals"

    <?php if (!defined('APPLICATION')) exit();
    function WriteDiscussion($Discussion, &$Sender, &$Session, $Alt2) {
     if ((!$Sender->Category) && ($Discussion->CategoryUrlCode == "banned-appeals")) return;
       static $Alt = FALSE;
       $CssClass = 'Item';

  • peregrineperegrine MVP
    edited April 2012

    Oh my there isnow a plugin for it!

    no need to change the helper functions.

    @x00 it would be cool if you incorporated this in to your categories plugin, i'm sure you could make it more elegant.

Sign In or Register to comment.