<span class="resolved" aria-label="Resolved" title="Topic is resolved."></span>How to save id across the front?

[ad_1]

Replies: 3

Good day. Clients have access only to the front version of the cabinet. The id field is not displayed there, but after looking in the comments, I first deduced through

echo get_the_author_meta( WPTELEGRAM_USERNAME_META_KEY, $current_author->ID );

And then, peeping, tore out part of the code

<?php
	$telegram_id  = get_the_author_meta( WPTELEGRAM_USER_ID_META_KEY, $user->ID );
	$field_name   = WPTELEGRAM_USER_ID_META_KEY;
	$bot_username = WPTG_Login()->options()->get( 'bot_username' );
		if ( empty( $bot_username ) ) {
			return;
		}
	$is_current_user = get_current_user_id() === $user->ID;
?>

<input type="text" name="<?php echo esc_attr( $field_name ); ?>" id="<?php echo esc_attr( $field_name ); ?>" value="<?php echo esc_attr( $telegram_id ); ?>" class="regular-text" />

But since I’m not a programmer, I can’t solve the problem. How to add an id through the front or change it? Could you advise?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer