Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey @mikehermary!

    Great question! I just checked on a fresh local install of WordPress 5.4, and there is no field to enter a Twitter username. This suggests that either a plugin or theme is adding that functionality there, so you’ll have better luck opening a topic question in their respective support pages :)!

    Warm regards!

    I think you’re looking for something like the snippet below. It’s not a foolproof solution but I hope it helps.

    function validate_twitter_handle($handle){
            $validated_handle = '';
    	$first_letter = substr( $handle, 0, 1);
    	if ( "@" === $first_letter){
    		$validated_handle = substr( $handle, 1 );
    	} else{
    		$validated_handle = $handle;
    	}
    	return $validated_handle;
    }
    $username = the_author_meta('twitter');
    $validated_name = validate_twitter_handle($username);
    
    • This reply was modified 4 years, 7 months ago by Nigel M Rodgers. Reason: removed comment strokes from code snippet
    Thread Starter mikehermary

    (@mikehermary)

    Hello M Media,

    The social profile URL fields are built into WordPress at least up to 5.3.2. On version 5.3.2, the Twitter handle asks to be entered without the “@” symbol. The Twenty Twenty theme when applied to the testing site instead of the custom theme is exhibiting the same issues. I think it may be a bug with WP core.

    Cheers,

    Hey @mikehermary!

    I’ve downgraded our local WP install to 5.3.2 keeping the TwentyTwenty theme and disabled all plugins, and do not see an option for adding a Twitter handle.

    Are you running a clean install of WordPress with no plugins?

    I’ve had a chat with a few other developers and we’re thinking these fields are most likely added by Yoast. If you temporarily disable Yoast, do the fields disappear?

    If so, it’s best to open the issue on the Yoast support page.

    • This reply was modified 4 years, 7 months ago by M Media. Reason: More info
    • This reply was modified 4 years, 7 months ago by M Media.
    • This reply was modified 4 years, 7 months ago by M Media.
    Thread Starter mikehermary

    (@mikehermary)

    Hello M Media,

    Yoast is the culprit. I will direct this question to their support forums.

    Thanks for your assistance.

    Cheers,

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Core user profile Twitter link broken’ is closed to new replies.