Skip to:
Content
Pages
Categories
Search
Top
Bottom

User input field change


  • jayapramod
    Participant

    @jayapramod

    Hi, I am using bbPress Version 2.6.4 in my WordPress site. I want to change the user input field ‘website’ to ‘WhatsApp no’. How to do this? I am not that much familiar in php coding. please help.

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

  • Robin W
    Moderator

    @robin-w

    quickest way is

    add_filter(  'gettext',  'rew_bbpress_translate', 20 , 3  );
    
    function rew_bbpress_translate( $translated, $text, $domain ) {
    	if ($domain == 'bbpress') {
         $words = array(
                            
                            'Website' => 'WhatsApp no'
                 );
         $translated = str_replace(  array_keys($words),  $words,  $translated );
    	}
    
         return $translated;
    }

    Put this in your child theme’s function file – or use

    Code Snippets


    jayapramod
    Participant

    @jayapramod

    Nothing changed… I applied this as:

    1. created child theme folder in my — wp-content >> themes >> astra-child

    2. created functions.php file inside that folder with provided code.

    3. Showed in themes list.

    On viewing my discussion page nothing changed.


    Robin W
    Moderator

    @robin-w

    and this is looking at someone’s bbpress profile?

    ie

    mysite.com/users/&username%/edit/


    jayapramod
    Participant

    @jayapramod

    For field name change I made changes in these files (in the wp-content >> plugins >> bbpres):

    includes/admin/metaboxes.php
    templates/default/bbpress/form-anonymous.php
    includes/admin/metaboxes.php
    templates/default/bbpress/form-user-edit.php
    templates/default/bbpress/user-profile.php

    Now it’s showing ‘Whatsapp number:’ instead of ‘Website:’. Still, there is a problem remaining, as I didn’t change the php code (not familiar in PHP coding) for website url, after entering the phone number it’s showing like this ‘http://9669856568’.

    Also made changes in all css files in this directory wp-content/plugins/bbpress/templates/default/css/, for font size change. From font-size: 12px; to font-size: 18px;.

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