Skip to:
Content
Pages
Categories
Search
Top
Bottom

Let a non-member view list of topics in forum but not actual topic content


  • markthedoc
    Participant

    @markthedoc

    Hi

    I’m trying to set my forum so that a non-member can view the list of topics in a forum but when they click on a topic to read it they get a message telling them they must be logged in to view the topic.

    This bbPress forum does exactly what I’m trying to achieve.

    I can hide the forums entirely using this code, but I want to show a list of topics to non-members but not allow them to view the content of the topic.

    Thanks in advance for any help and advice.

Viewing 2 replies - 1 through 2 (of 2 total)

  • Robin W
    Moderator

    @robin-w

    loop-single-reply is the template that displays posts and replies

    wp-content/plugins/bbpress/templates/default/bbpress

    copy this to a bbpress directory in your theme (see codex for how to do this if needed), and then you should be able to put a “logged in” condition around whatever you want in this. For instance

    <?php bbp_reply_content(); ?>

    to make that bit conditional


    markthedoc
    Participant

    @markthedoc

    Hey Robin, thanks for the reply.

    How would I hide the whole bbp-replies table on the topic page as
    <?php bbp_reply_content(); ?>
    just hides the cell.

    Thanks for your help with this.

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