I have tried disabling the username in the functions.php through

 if(!is_admin()){
  remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
  add_action( 'personal_options', 'prefix_hide_personal_options' );
}
function prefix_hide_personal_options() {
?>
<script type="text/javascript">
  jQuery(document).ready(function( $ ){
$("#registerform #user_login, #your-profile #user_login, #your-profile #nickname, #your-profile #display_name, #your-profile #url,  #your-profile #description").parents("div.form-group").hide();
  });
</script>
<?php
}

I have added this id name #registerform #user_login to be hidden but nothing happens in the registration form page, still username is showing up.

Any idea that could help me point out the problem and what to do. I am newbie in wp, don't have yet solid understanding in plugins.

You are not trying to remove it by Wordpress, but by jQUery.

It looks more a problem matching the element you want to hide.

I don't know your ids and classes on your html to give you the exactly answer, but the a simple proccess to find your answer:

You can open your console developer (Chrome) or firebug (Firefox) on your navigator to insert your function on javascript console:

jQuery(document).ready(function( $ ){
    $("#registerform #user_login, #your-profile #user_login, #your-profile #nickname, #your-profile #display_name, #your-profile #url,  #your-profile #description").parents("div.form-group").hide();
});

and modify until it matches and hide what you want. The Console developer also helps you you find the id and or class name you want to hide.

So you get the right function and replace in your function:

function prefix_hide_personal_options() {
?>
<script type="text/javascript">
   *** here ***
</script>
<?php
}
  • thank you for responding to my post and sharing your idea. – Lizza Faith Jul 18 '14 at 20:09

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.