Support » Plugin: Theme My Login » How to remove “About Yourself” on profile page?

  • Resolved pparnham

    (@pparnham)


    I am trying to delete the “About Yourself” section on the profile page.

    To this end, I have saved a copy of profile-form.php inside a new folder in my child theme directory. The folder is labelled: theme-my-login

    However, when I delete the following code all I get is a blank screen.

    Relevant code

    <h3><?php _e( ‘About Yourself’, ‘theme-my-login’ ); ?></h3>

    <table class=”tml-form-table”>
    <tr class=”tml-user-description-wrap”>
    <th><label for=”description”><?php _e( ‘Biographical Info’, ‘theme-my-login’ ); ?></label></th>
    <td><textarea name=”description” id=”description” rows=”5″ cols=”30″><?php echo esc_html( $profileuser->description ); ?></textarea><br />
    <span class=”description”><?php _e( ‘Share a little biographical information to fill out your profile. This may be shown publicly.’, ‘theme-my-login’ ); ?></span></td>
    </tr>

    <?php
    $show_password_fields = apply_filters( ‘show_password_fields’, true, $profileuser );
    if ( $show_password_fields ) :
    ?>
    </table>

    ====================================

    Any ideas as to how I can achieve the desired outcome?

    Thank you very much.

    Best

    Philip

    PS: Our site is currently under construction and password protected so I can’t provide a link I’m afraid.

Viewing 8 replies - 1 through 8 (of 8 total)
  • I have saved a copy of profile-form.php inside a new folder in my child theme directory. The folder is labelled: theme-my-login

    Don’t paste the copy on that subfolder, just leave it inside your child themes root directory. Theme My Login reads that folder first 😉

    About the code, try to comment all these lines (129-186):

    <h3><?php _e( 'About Yourself', 'theme-my-login' ); ?></h3>
    
    		<table class="tml-form-table">
    		<tr class="tml-user-description-wrap">
    			<th><label for="description"><?php _e( 'Biographical Info', 'theme-my-login' ); ?></label></th>
    			<td><textarea name="description" id="description" rows="5" cols="30"><?php echo esc_html( $profileuser->description ); ?></textarea><br />
    			<span class="description"><?php _e( 'Share a little biographical information to fill out your profile. This may be shown publicly.', 'theme-my-login' ); ?></span></td>
    		</tr>
    
    		<?php
    		$show_password_fields = apply_filters( 'show_password_fields', true, $profileuser );
    		if ( $show_password_fields ) :
    		?>
    		</table>
    
    		<h3><?php _e( 'Account Management', 'theme-my-login' ); ?></h3>
    		<table class="tml-form-table">
    		<tr id="password" class="user-pass1-wrap">
    			<th><label for="pass1"><?php _e( 'New Password', 'theme-my-login' ); ?></label></th>
    			<td>
    				<input class="hidden" value=" " /><!-- #24364 workaround -->
    				<button type="button" class="button button-secondary wp-generate-pw hide-if-no-js"><?php _e( 'Generate Password', 'theme-my-login' ); ?></button>
    				<div class="wp-pwd hide-if-js">
    					<span class="password-input-wrapper">
    						<input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="off" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
    					</span>
    					<div style="display:none" id="pass-strength-result" aria-live="polite"></div>
    					<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password', 'theme-my-login' ); ?>">
    						<span class="dashicons dashicons-hidden"></span>
    						<span class="text"><?php _e( 'Hide', 'theme-my-login' ); ?></span>
    					</button>
    					<button type="button" class="button button-secondary wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change', 'theme-my-login' ); ?>">
    						<span class="text"><?php _e( 'Cancel', 'theme-my-login' ); ?></span>
    					</button>
    				</div>
    			</td>
    		</tr>
    		<tr class="user-pass2-wrap hide-if-js">
    			<th scope="row"><label for="pass2"><?php _e( 'Repeat New Password', 'theme-my-login' ); ?></label></th>
    			<td>
    			<input name="pass2" type="password" id="pass2" class="regular-text" value="" autocomplete="off" />
    			<p class="description"><?php _e( 'Type your new password again.', 'theme-my-login' ); ?></p>
    			</td>
    		</tr>
    		<tr class="pw-weak">
    			<th><?php _e( 'Confirm Password', 'theme-my-login' ); ?></th>
    			<td>
    				<label>
    					<input type="checkbox" name="pw_weak" class="pw-checkbox" />
    					<?php _e( 'Confirm use of weak password', 'theme-my-login' ); ?>
    				</label>
    			</td>
    		</tr>
    		<?php endif; ?>
    
    		</table>
    
    		<?php do_action( 'show_user_profile', $profileuser ); ?>

    It worked for me!

    Luis,

    You are a super star! That worked like a dream. Thank you ever so much.

    Just in case anyone comes across your helpful advice after a forum search, in the end I only commented out the bit I originally highlighted because I was keen to preserve the account management function.

    That’s great. Thanks again.

    Enjoy your weekend.

    Philip

    I’m glad I could help! thank you.

    I’d like to add something. You don’t need to preserve anything, because you have the original file in the Theme My Login directory, so in case you need to restore the function, you can get the code from there.

    I guess that’s just diferents ways to work 😉

    Enjoy yours!!! 🙂

    That’s helpful too. I like the idea of a safety net. Thanks again.

    Philip

    I have saved a copy of profile-form.php inside a new folder in my child theme directory. The folder is labelled: theme-my-login—
    Thanks for wonderful advise Philip but seems I don’t have any child theme directory. Can you help me too.
    I have tried editing the profile-form.php too but it doesn’t work. Always display the default profile page.

    @pooja25, the idea is to place a copy of profile-for.php in the root directory of your active theme. Whether is a child theme or not. Theme My Login is going to read always that file first (don place it in a subfloder). You can edit it as you please.

    Plugin Author Jeff Farthing

    (@jfarthing84)

    You can actually also place it in a sub-directory called theme-my-login.

    Ah ok @jfarthing84 I didn’t know that. Sorry. I’ll have in count for the next design to have my active theme root folder more organized. 😉

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to remove “About Yourself” on profile page?’ is closed to new replies.