Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change text in bbPress (subscribe, favorite, reply ..)


  • OsamaNuman
    Participant

    @osamanuman

    Hello,

    I have 2 inquiries:

    1- I would like to know how to change buttons texts (subscribe, favorite, submit) in forums and topics lists?
    2- How to change/remove some reply links (Stick , merge ..etc)

    How can I do this on my child theme, is it by copying the php files to my child theme? if yes, which files are they? OR I should have a function file created by me to do that ?

    Thanks

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

  • OsamaNuman
    Participant

    @osamanuman

    I found that I can change them from “includes” file, in users, forums, topics (template.php) files, but how can I modify them all since they have the same name and I can’t copy them in my bbPress folder in my child theme !?


    Robkk
    Moderator

    @robkk

    You cannot edit these things like the customizable templates in bbPress.

    I guess you can either use filters to customize the text, or create a custom language file.

    Here is an example of the

    function rkk_custom_admin_link( $links ) {
    
       $links['reply'] = bbp_get_topic_reply_link( array(
          'reply_text' => __( 'Reply to this Topic',   'bbpress' ),
       ) );
    
       return $links;
    }
    add_filter( 'bbp_topic_admin_links', 'rkk_custom_admin_link' );

    bbp_topic_admin_links
    bbp_reply_admin_links

    This post might help too.

    Integrating Font Awesome Icons in bbPress

    Robin showed me a function that could help modify the admin links displayed.

    Here is some example code to customize the admin links.

    //change admin links displayed
    function change_admin_links ($r) {
    $r['links'] = apply_filters( 'rw_reply_admin_links', array(
    				'edit'  => bbp_get_reply_edit_link ( $r ),
    				'move'  => bbp_get_reply_move_link ( $r )
    			), $r['id'] );
    return $r['links'] ;
    }
    add_filter ('bbp_reply_admin_links', 'change_admin_links' ) ;

    Subscribe links text I mention a way to customize it here.

    Problems overwriting defaults

    Favorite links would have a similar function except the filter is probably.

    bbp_before_get_topic_favorite_link_parse_args

    And the actual text would be

    'favorite'  => esc_html__( 'Like',   'bbpress' ),
    'favorited' => esc_html__( 'Dislike', 'bbpress' )

    OsamaNuman
    Participant

    @osamanuman

    I added the first filter in my function.php and it worked great! thanks for the help .. that was nice of you, Can you help in telling me How I can remove any link from the admin_links if I can ? or How to remove the “|” separator ?

    Thanks Again

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