Skip to:
Content
Pages
Categories
Search
Top
Bottom

hide a specific forum

  • @1337jester

    Participant

    Hi!

    I want to hide a specific forum from being shown in the forums overview.. (I do not provide a link to ../forums, but users could easily find it by simply cutting the ‘official’ forums URLs down to ../forums)

    So this specific forum should ONLY be accessible by clicking a very hidden link (a single “.” within a specific thread). But it should still be accessible by anyone, who is clever enough to find that hidden link. All this is part of a ‘game’, so to speak..

    Any ideas about how to do that would be greatly appreciated!

Viewing 3 replies - 1 through 3 (of 3 total)
  • @robin-w

    Moderator
    add_filter('bbp_before_has_forums_parse_args', 'rew_hide_forums');
    
    function rew_hide_forums($args='') {
     $args['post__not_in'] = array('31867');
    return $args ;
    }

    where 31867 is the ID of the forum you want to hide, you can do multiple using array('31867', '45655') etc.

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    @1337jester

    Participant

    AWESOME!
    You are the best!!
    Thank you!!!

    ;*

    @robin-w

    Moderator

    great – glad you are fixed

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar