Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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;
?>
share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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