Skip to:
Content
Pages
Categories
Search
Top
Bottom

BBpress + Simple membership


  • leehaeun29
    Participant

    @leehaeun29

    Hello everyone,

    I have been using simple membership + BB press to create forums only for members. Now when nonmembers click each topic, they would see the following message:

    “PRIVATE, You do not have permission to view this forum.”

    I would like to customize this message and say “This forum is visible only to this group members, please click here and sign up for this group” something like that. I reached out to Simple Membership and I was told to inquire BB press and/or use Loco Translate plugin.

    Also, can anyone tell me how to make anonymous topics?

    Any input will be greatly appreciated. I am self-taught and I have no coding background so a detailed explanation will be appreciated 🙂

    Here are the details of my website:
    WordPress 5.9.2 running Roseta theme.
    BB press Version 2.6.9

    Thank you!

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

  • Robin W
    Moderator

    @robin-w

    This function should do that – change “mysite.com/login” to where you want it to go

    function rew_change_text( $translated_text, $text, $domain ) {
    	if ( $text == 'You do not have permission to view this forum.' ) {
    	$translated_text = 'This forum is visible only to this group members, please click <a href="mysite.com/login">here</a> and sign up for this group';
    	}
    	return $translated_text;
    }
    
    add_filter( 'gettext', 'rew_change_text', 20, 3 );

    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


    leehaeun29
    Participant

    @leehaeun29

    Hello Robin,

    Thank you so much for your assistance. I was able to change the wording through the Code Snippets plugin. Now maybe it has to do with the plugin but when I copied the code you provided, it doesn’t show the hyperlink but plan texts (I used [] instead of <> so it delivers my questions) :

    “XX forum is visible only to XX group members and YY Forum is visible only to YY group members. Please click [a href=”link”]here[/a] and sign up for the XX or YY group”

    Is there any way I can make it hyperlink? Also, I would appreciate it if you could tell me how to enlarge the font size.

    Additionally, I would like to know how can I create an anonymous topic? Now it shows my ID but I would like to make it anonymous for privacy issues.

    I really appreciate your assistance. Thank you!


    Robin W
    Moderator

    @robin-w


    leehaeun29
    Participant

    @leehaeun29

    ??

    I said the code you provided doesn’t turn out as a hyperlink – I didn’t ask what a href Attribute is?

    Also, what about my other questions about the font size and adding forums anonymously?

    I look forward to having complete answers.

    Thank you.


    Robin W
    Moderator

    @robin-w

    seriously????

    This is free software with free support offered by volunteers, clearly you expect too much


    leehaeun29
    Participant

    @leehaeun29

    ???
    You could have said that it is all you can say?
    I don’t know why somehow I became a very greedy person here?

    Anyway, thank you for what you provided so far. Again, I appreciated it as I said it multiple times.


    Robin W
    Moderator

    @robin-w

    I don’t know why somehow I became a very greedy person here?

    I look forward to having complete answers.

    This makes you look like you are demanding, I am simply someone who triers to help here

    But if you are asking, then use the ‘code’ button in the reply to post the exact code you are using, and I will try and help further

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