Support Forum
So I am going to assume that you already have a wp theme template file for displaying the author archive... you will need to edit that file... near the top - or at least outside the loop, add this code:
sp_forum_api_support();
that will initialize some forum data... then wherever you want in the author archive template file, you can get at the SP identity data via these php variables
$spThisUser->skype
$spThisUser->facebook
$spThisUser->twitter
$spThisUser->aim
$spThisUser->yim
$spThisUser->jabber
$spThisUser->msn
$spThisUser->icq
$spThisUser->myspace
$spThisUser->linkedin
$spThisUser->youtube
$spThisUser->googleplus
and there ya go...
Visit Cruise Talk Central and Mr Papa's World
This is what my author page looks like http://www.ihiphopmusic.com/pr.....file/baiyu
Now where exactly am I placing sp_forum_api_support(); ?
Does that work the same way as:
<?php $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); ?>
I know my way around WordPress design wise, but I'm a beginner in PHP.
well I assume you are familiar with a wp template file then... its a mixture of php and html, typically... and your little example show you how to enter a php code fragment...
wp archive pages, of which the author page is one, work on the principal of the WordPress loop to display a bunch of items... typically starts with something like:
if (have_posts()) :
while (have_posts()) : the_post();
though there are many, many ways to start the loop... I only want that code fragment run once to init some forum data... I assume you will only output the identities once too...
but not knowing your wp theme template file for the author archives, no way to tell you exactly where... somewhere near the top AND before you want to output the identities, just add
<?php
sp_forum_api_support();
?>
if its not in an php code section... if it is, you can omit the first and last lines...
Visit Cruise Talk Central and Mr Papa's World
short answer, yes... long answer is well, depends what you want... that will just output their facebook account... you might want to prepend http://facebook.com/ to it... and potentially make it a link...
Visit Cruise Talk Central and Mr Papa's World
if (!empty($spThisUser->facebook)) echo $spThisUser->facebook;
should do it...
Visit Cruise Talk Central and Mr Papa's World
sorry, laid out above??
do you mean something like this:
if (!empty($spThisUser->facebook)) echo "<a href='http://facebook.com/$spThisUser->facebook'><img src='xxxxx' /></a>;
of course, you would need to fill in the xxxxx part to your image...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)