• Resolved sharecommons

    (@sharecommons)


    Good day guys,
    I wanted to add social networking information to my author.php file. So this is what I did:
    I added this to my functions.php file:

    [Large code excerpt removed by moderator. Per forum rules, please use the pastebin for all large code excerpts. It works better anyway.]

    The end result is this:
    http://sharecommons.com/author/pangel/
    http://sharecommons.com/author/shamrock/
    http://sharecommons.com/author/jackdan/

    Question: What should I do so that pangel’s social networking appears only on her profile and same with other authors. Right now, everyone’s social networking links are showing on everyone’s profile.

    I believe, I need to change this particular code:

    <?php
    		$authors = $wpdb->get_results('SELECT DISTINCT post_author FROM '.$wpdb->posts);
    		if($authors):
    		foreach($authors as $author):
    ?>

    What should I change this code to so that social networking links don’t mix-up with each other. Please help.

    Thank you for any help you can provide.

    Regards.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pulling information from database’ is closed to new replies.