Title: Hide (required)
Last modified: September 26, 2016

---

# Hide (required)

 *  Resolved [metalhead](https://wordpress.org/support/users/aaronthomas1979/)
 * (@aaronthomas1979)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/hide-required/)
 * Hello,
 * I have several custom fields, which are all required, however, I would like to
   
   prevent “(required)” from showing up after each field, as it looks very unattractive.
   I’d rather just tell users that “All fields are required.”
 * I removed (required) from all PHP files in the Xprofile plugin’s folder, and 
   I also removed it from the register.php, completely, but it still shows up.
 * Does anyone know how I can hide it?
 * PS) I was able to hide it from the username, password, & email fields by editing
   register.php, and I was able to hide it from xprofile field’s birthday selector,
   but I just can’t seem to hide it from the other areas, such as the Drop Down 
   Select Box and the Text Box.
 * Thank you!
    -  This topic was modified 9 years, 8 months ago by [metalhead](https://wordpress.org/support/users/aaronthomas1979/).

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

 *  Plugin Author [donmik](https://wordpress.org/support/users/atallos/)
 * (@atallos)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/hide-required/#post-8234050)
 * Add this to your functions.php:
 *     ```
       add_filter( 'bxcft_field_label', 'my_custom_label' );
       function my_custom_label( $label ) {
           return str_replace( esc_html__( '(required)', 'buddypress' ), '', $label );
       }
       ```
   
 * It should remove all required text from labels. This will work only with the 
   field types from my plugin.
 *  Thread Starter [metalhead](https://wordpress.org/support/users/aaronthomas1979/)
 * (@aaronthomas1979)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/hide-required/#post-8234728)
 * Thanks for your reply!
 * I added the code, but it didn’t work for me, for some reason.
 * I’m using a child theme, so let me explain all the places I tried adding the 
   code:
 * added it to child theme’s functions.php <- no luck, removed it from there
    added
   it to parent theme’s functions.php <- no luck, removed it from there added it
   to bp-xprofile-custom-fields-type.php (just a guess) <- no luck, removed it
 * Is there anything else you can think of that might be getting in the way of this
   new function from working?
 * Thanks again!
 *  Plugin Author [donmik](https://wordpress.org/support/users/atallos/)
 * (@atallos)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/hide-required/#post-8235096)
 * Ummm, maybe your theme is adding the text? It works on my test site.
 * Send me an url if you can.
 *  Thread Starter [metalhead](https://wordpress.org/support/users/aaronthomas1979/)
 * (@aaronthomas1979)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/hide-required/#post-8235930)
 * Thanks for your help. A link is right [here.](http://www.adultchatclub.com)
 * I did remove the string (required) from all of the plugin’s php files. Would 
   that throw the function off?
 *  Plugin Author [donmik](https://wordpress.org/support/users/atallos/)
 * (@atallos)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/hide-required/#post-8237470)
 * Hi,
 * So I can see you are only using birthdate from my plugin, and this is the only
   field which is not displaying the required string. This is because the code you
   added is working.
 * The rest of your fields are from buddypress plugin, so they don’t work with the
   code using my plugin’s filter.
 * Add the following code to your theme’s stylesheet, and hide the required word
   with some css:
 *     ```
       .bp-required-field-label {
           display: none;
       }
       ```
   
 * For the field type location, I don’t know what plugin you are using but if this
   is a plugin you should talk with his author or maybe simply translating the required
   string to be just a blank space.
 *  Thread Starter [metalhead](https://wordpress.org/support/users/aaronthomas1979/)
 * (@aaronthomas1979)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/hide-required/#post-8241711)
 * Thank you! This resolved it. Thanks for everything!

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

The topic ‘Hide (required)’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/buddypress-xprofile-custom-fields-
   type.svg)
 * [Buddypress Xprofile Custom Fields Type](https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/buddypress-xprofile-custom-fields-type/)
 * [Active Topics](https://wordpress.org/support/plugin/buddypress-xprofile-custom-fields-type/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/buddypress-xprofile-custom-fields-type/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/buddypress-xprofile-custom-fields-type/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [metalhead](https://wordpress.org/support/users/aaronthomas1979/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/hide-required/#post-8241711)
 * Status: resolved