Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hiding replies from anonymous visitors

  • @echoleaf

    Participant

    I just copied the bbpress theme files to my child theme and thought asking here would be a lot easier than wading through all the code.

    I would like to hide replies from anonymous visitors, basically with an if/else statement. If logged in, show replies; if not logged in, hide replies and show a message that it’s for members only. The idea is that the topic would be readable by Google but the replies would be private.

    Is there a single theme file I can edit for this or are there multiple files to edit? Trying to figure out which file is like looking for a needle in haystack! Thanks.

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

    Moderator

    I start by looking at the ‘loop’ files – loop-replies.php looks likely

    @echoleaf

    Participant

    Thank you for pointing me in the right direction 🙂

    @robin-w

    Moderator

    In the spirit of free community software – if/when you work a solution out, do post it here, so that others following along in a few months/years can see how it was done !

    Thanks

    @echoleaf

    Participant

    I will 🙂

    @prokops

    Participant

    For anyone looking for news on this topic, I have a simple css solution:

    /* FORUM */
    .logged-in #main .bbp-replies.forums,
    .logged-in #main .bbp-pagination-count{
    display: block;
    }
    #main .bbp-replies.forums,
    #main .bbp-pagination-count {
    display: none;
    }

    This does not hide replies programatically, just hides them from view, but this might be good enough for some, as it is for us. It is just a barrier made to make people signup / login.

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