• Skip to primary navigation
  • Skip to main content

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Store
    • Cart
    • Checkout
  • Blog
    • Basics [Free]
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Contact
  • Sign In
  • Show Search
Hide Search
Home » Tips and Tricks » Clean up the user profile of unused unwanted fields

Clean up the user profile of unused unwanted fields

Chad Butler · May 3, 2013 ·

The WP-Members plugin does not exercise any control over WordPress native fields as far as removing them from the User Profile.  The plugin only determines if you are using these in the front-end elements of the plugin (such as front-side registration and front-side user profile).  If you are not using a handful of these fields and would like to remove them from the User Profile (yoursite.com/wp-admin/user-edit.php), you can do that with a little bit of scripting in your functions.php file.  Here are some examples. 

This article is only available to WP-Members Support Subscribers. If you have an existing subscription, please login below. If you do not have a current support subscription, you can purchase a support subscription here.

Already a Member? Log In Here
   
Forgot password? Click here to reset

To gain full access to WP-Members premium content, a current support subscription is required. You can purchase an annual support subscription for as little as $59, which provides you with access to priority support, a customer support forum, access to code snippets, and more.

Why wait? Choose your subscription option here.

[
Why join?]

Tips and Tricks tips

Welcome to RocketGeek Interactive › Forums › Clean up the user profile of unused unwanted fields

Tagged: tips

  • This topic has 9 replies, 4 voices, and was last updated 6 years, 7 months ago by msargenttrue.
Viewing 6 reply threads
  • Author
    Posts
    • May 3, 2013 at 2:29 pm #2540
      Chad Butler
      Keymaster

      The WP-Members plugin does not exercise any control over WordPress native fields as far as removing them from the User Profile.  The plugin only deter
      [See the full post at: Clean up the user profile of unused unwanted fields]

    • May 4, 2013 at 3:21 pm #2549
      robotballoon
      Participant

      Chad, this is just what I was looking for today– but when I pasted them into my child theme’s functions.php file, they didn’t work.

      Just read this to make sure I wasn’t pasting things in the wrong place:

      http://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/

      Any thoughts on why this wouldn’t be working on my child theme?

    • May 4, 2013 at 4:17 pm #2551
      Chad Butler
      Keymaster

      When you paste them into your child theme, are they somewhere inside php delimiters ( <?php … ?> )

    • May 9, 2013 at 9:15 pm #2564
      robotballoon
      Participant

      Well not sure why, but I tried pasting it in again into my functions.php file, just like I did before and this time it worked. Sorry for the false alarm.

    • May 10, 2013 at 2:29 pm #2570
      Chad Butler
      Keymaster

      No problem!   Glad it worked the second go-around.

      • January 22, 2014 at 6:19 pm #3922
        scarlettr8
        Participant

        Same problem here, doesn’t work. All it does is print the echo statement:

        jQuery(document).ready(function($) { $(‘form#your-profile label[for=url], form#your-profile input#url’).hide(); $(‘form#your-profile label[for=description], form#your-profile textarea#description, form#your-profile span.description’).hide(); });

        Inside php tags, not inside another function, actual code pasted:

        add_action(‘admin_head’,’remove_url_bio’);
        function remove_url_bio(){
        echo “\n” . ‘jQuery(document).ready(function($) {
        $(\’form#your-profile label[for=url], form#your-profile input#url\’).hide();
        $(\’form#your-profile label[for=description], form#your-profile textarea#description, form#your-profile span.description\’).hide();
        });
        ‘ . “\n”;
        }

        • January 22, 2014 at 10:27 pm #3924
          Chad Butler
          Keymaster

          Thanks for your question because there is a problem with the script as displayed. It was actually not fully displaying. Evidently, there was an issue with the parser that I have displaying code snippets and it was not displaying the <script> tag – that was being read as HTML and not as a preformatted code snippet.

          So what you pasted there is what was displayed in the post, but it wasn’t totally correct. I’ve updated the code snippet manually in the post and it should be displaying correctly now. It should be as follows:

          add_action('admin_head','remove_url_bio');
          function remove_url_bio(){
          	echo "\n" . '<script type="text/javascript">jQuery(document).ready(function($) {
          	$(\'form#your-profile label[for=url], form#your-profile input#url\').hide();
          	$(\'form#your-profile label[for=description], form#your-profile textarea#description, form#your-profile span.description\').hide();
          	});
          	</script>' . "\n";
          }
    • January 22, 2014 at 11:47 pm #3925
      scarlettr8
      Participant

      Beautiful, thanks. Was making me crazy as the previous poster said it worked 🙁

      • January 23, 2014 at 3:47 pm #3926
        Chad Butler
        Keymaster

        I thought that, too, but I’m thinking they had to have been referring to the other scripts.

        But I’m glad you commented because I would probably not have noticed the problem otherwise!

    • July 16, 2014 at 4:01 pm #5370
      msargenttrue
      Participant

      I just tried hiding the Website and Bio fields. It works great, but it leaves the table rows that contain those hidden fields so I ended up with some unwanted empty space. I modified the code to also hide the parent table rows for both Website and Bio.

      This worked for me:

      add_action('admin_head','remove_url_bio');
      function remove_url_bio(){
      	echo "\n" . '<script type="text/javascript">jQuery(document).ready(function($) {
      	$(\'form#your-profile label[for=url], form#your-profile input#url\').hide();
      	$(\'form#your-profile input#url\').parents(\'tr\').hide();
      	$(\'form#your-profile label[for=description], form#your-profile textarea#description, form#your-profile span.description\').hide();
      	$(\'form#your-profile textarea#description\').parents(\'tr\').hide();
      	});
      	</script>' . "\n";
      }
  • Author
    Posts
Viewing 6 reply threads
  • You must be logged in to reply to this topic.
Log In

Ready to get started?

Join Today!

© 2021 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Refund Policy