1

I want to use the Google+ and twitter links that can be added in User's profile using the WordPress SEO plugin and display them on the author page. Is there any way I can get those links from the plugin or do I need to fetch them using some other method say directly from database.

SEO Plugin @the official repo

2

I found a way to do it in author.php file

Just use the following to display the Google+ and Twitter links:

<?php
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
echo $curauth->googleplus;
echo $curauth->twitter;
?>
3
  • And where does $curauth come from? – kaiser Oct 15 '12 at 1:37
  • I have updated the answer to include the $curauth. – Virendra Oct 15 '12 at 1:39
  • Upvoted. Now it's a full and helpful answer :) – kaiser Oct 15 '12 at 1:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.