Reply To: Make people want to join my forum!
In fact you can do it 😎
1.- Copy the follow code and paste it in functions.php file (If you dont know about functions please read about it before do this):
//Restrict Topic and Replies Content For No-Registered Users
function pj_hla_logged_in_topics($have_posts){
if (!is_user_logged_in()){
$have_posts = null;
}
return $have_posts;
}
add_filter('bbp_has_replies', 'pj_hla_logged_in_topics');
With the above code your visitors (no registered users) will see only the topic title. The code locks topic content and all replies.
2.- After pasted the code, try open a topic so you will see a bbpress notice about “you dont have access to… etc something like that”. You need to find the file where is that notice, to edit it with anything you want, for example a link to the sign up page (Sorry, I dont remember the file name).
To show topics titles in your post or other pages you have 4 options:
1.- Add each URL in your blog post with the same topic title and link it to the topic (hard work but good if you like linkbuilding)
2.- Default bbpress shortcode: [bbp-single-topic id=$topic_id] – Display a single topic. eg. [bbp-single-topic id=4096] ( https://codex.bbpress.org/features/shortcodes/#topics )
3.- @robin-w plugin: http://www.rewweb.co.uk/bbpress-additional-shortcodes/
4.- Hire a developer to create a shortcode to show last topics or whatever about topics.
Hope this can help you!