Hiding "Website" field on Account page

Hello. I am using the latest version of the Membership plugin. On the Account page, is there any way easy t hide the "Website" field? I'm not looking to add fields or modify existing fields. I just want to hide that one field for "Website".

Thank you.

  • Ash

    Hello @Nick

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    Please use the following code:

    add_action( 'wp_footer', 'remove_website_field' );
    function remove_website_field() {
    	if( curPageURL() == 'https://beaconhillwomensforum.org/members-only/account-information/' ){
    	?>
    	<script type="text/javascript">
    	jQuery(function() {
    		$('#url').closest('.form-element').remove();
    	});
    	</script>
    	<?php
    	}
    }
    
    function curPageURL() {
     $pageURL = 'http';
     if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
     $pageURL .= "://";
     if ($_SERVER["SERVER_PORT"] != "80") {
      $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
     } else {
      $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
     }
     return $pageURL;
    }

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.