Author Box social links issue

Hi there,

I have the issue where the Twitter link in the Author box is showing the wrong link (showing the blogpost URL with the “@” Twitter username added on the end).

I’ve tried adding the full Twitter URL in Users->Your Profile as advised HERE, but the issue is still there.

I also can’t get any other social links to show-up - e.g. I cannot add a LinkedIn link, for example. It just doesn’t show up.

You should know that I’ve added this code in my functions.php to append the Author box to the end of all posts:

add_filter( 'the_content', 'custom_author_code');

function custom_author_code($content) {
   if ( is_single() ) {
      return $content . do_shortcode('[author title="About the Author"]');
   } else {
      return $content;
   }
}

I’ve also the following to allow me to add the full range of HTML to the Authorbox description:

// Disable WordPress sanitization to allow more than just $allowedtags from /wp-includes/kses.php.
remove_filter('pre_user_description', 'wp_filter_kses');
// Add sanitization for WordPress posts.
add_filter( 'pre_user_description', 'wp_filter_post_kses');
// END Disable WordPress sanitization

However removing the above still doesn’t solve the Authorbox social media link issue.

I’ve tried disabling all plugins except Cornerstone, but the issue is still there.

Any ideas what’s going on?

Hi Gee,

Thanks for reaching out.

Please add the complete twitter URL instead of just username. And linkedIn is never part of the author shortcode, that field is probably added by 3rd party plugin or custom code. It’s only limited to facebook, twitter, and google+.

Thanks!

Tried it - doesn’t work. Log in to the site for yourself and see.

Hey Gee,

I see the issue in your site. It looks like something is stripping the Twitter domain. Please try deactivating social related plugins like Yoast SEO for testing purposes. I couldn’t do that because it’s a live site.

Thanks.

Thanks. I have a staging site where I tried deactivating all plugins except Cornerstone. The issue is still there.

I can give you access to the staging site, to play around safely, if you would like?

Hello Gee,

Could you please send us the login credentials of your staging site so that can investigate further and figure out why it is not saving the twitter url and why there is a LinkedIn url which is not supposed to be there because it is not a default WP option setting?

Thank you in advance.

The LinkedIn URL is being added by a plugin (WPSSO). I was unaware that X only pulled-in Twitter/Facebook/G+, so you can ignore that.

Staging creds are added here.

Thanks.

Hello Gee,

Thanks for providing the information. I have logged in and went ahead temporarily disabled the WPSSO plugins. I change the twitter into a url http://twitter.com/kexino, click the save button and now your twitter is linking to your profile correctly.

Please check the secure note.

You guys really are the best! I didn’t think of trying that. Really appreciate the help for something, it turns out, wasn’t even an X issue.

Thanks so much!

You’re most welcome, Gee.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.