Skip to:
Content
Pages
Categories
Search
Top
Bottom

User Profile fields hide on Profile page


  • startershut
    Participant

    @startershut

    Hi,

    I have noticed there are a few fields on the ‘Your Profile’ on the Users admin section. Is there a way from hiding these fields from the users?

    I don’t require biographical information, fax and maybe even addresses.

    Is it possible to hide these so users don’t even need to fill them out or see them on their profile?

    Thanks

Viewing 1 replies (of 1 total)

  • danbp
    Moderator

    @danbp

    biographical information, fax and maybe even addresses. These are WordPress or theme specific fields which are not visible on frontend profiles. BP doesn’t use them if you use the xtended profile component.
    Anyway…

    Try this snippet, and use it to your need from within your child-theme functions.php

    function remove_user_fields(){
    
    // Print jQuery that removes unneeded elements
      ?>
    
      <script type="text/javascript">
        jQuery(document).ready( function($) {
        // the magic goes here...
          var ids = ['#description', '#comment_shortcuts', '#color-picker']; // Check in page source for other ID's
          for (var i = 0; i < ids.length; i++) {
            $(ids[i]).closest('tr').remove();
          }
        });
      </script>
    
      <?php
    }
    
    add_action( 'admin_footer', 'remove_user_fields' );
Viewing 1 replies (of 1 total)
  • The topic ‘User Profile fields hide on Profile page’ is closed to new replies.
Skip to toolbar