Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 504799

Profile page edit and save contact info.

$
0
0

Replies: 0

I’m having great success using this plugin, however I came across two problems when removing the contact info fields on the TML profile page. I’m not sure how to remove only part of the contact info fields without removing them all.

It seams the contact info fields are grouped together in one block of code.

<?php
			foreach ( wp_get_user_contact_methods() as $name => $desc ) {
		?>
		<tr class="tml-user-contact-method-<?php echo $name; ?>-wrap">
			<th><label for="<?php echo $name; ?>"><?php echo apply_filters( 'user_'.$name.'_label', $desc ); ?></label></th>
			<td><input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr( $profileuser->$name ); ?>" class="regular-text" /></td>
		</tr>
		<?php

Since they are grouped under one block of code, I’m not sure what labels point to what.

Example:
I want to remove the social media, website and company name fields, while leaving the zip code, phone number, city, etc. fields.
I’m sure the fix is simple, but how would I target, display and save those fields like I would the nickname field, which is coded as such;

<tr class="tml-nickname-wrap">
			<th><label for="nickname"><?php _e( 'Username', 'theme-my-login' ); ?></label></th>
			<td><input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( $profileuser->nickname ); ?>" disabled="disabled" class="regular-text" /> <span class="description"><?php _e( 'Usernames cannot be changed.', 'theme-my-login' ); ?></span></td>
		</tr> 

Thank you for your assistance.


Viewing all articles
Browse latest Browse all 504799

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>