Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Double help for authors.php WordPress

  • SOLVED

Hi,

i need two coding helps for my [[LINK href="http://www.dersalon.org/?author=16 "]]authors.php[[/LINK]]

At first there are the links of kontakt: www facebook twitter vz which only should appear, when actually something is in the profile-field.

And secondly i have a problem with the LETZTE DISKUSSIONSBEITRÄGE which for the author linked above shows no comments, although he had posted one.

Who could help me with both?

Answers (3)

2010-06-05

yrweb answers:

Hi,
could you tell me where are stored the links of the author? Does-it a plugin where you fill in something or...?

For the second question :
in your author.php file, have you tried something like :

<?php
$comments = get_comments('author_id='.$_GET['id']);
foreach($comments as $comm) :
echo($comm->comment_content);
endforeach;
?>


Regards,
YrWeb.

2010-06-05

Konrad Karpieszuk answers:

hello philip.

the best answer we can get if you will show us source of author.php - please open this file in edition mode and copy all of it and paste for example here http://nopaste.info/

But if it is impossible, i will try to guess. :)

1.

kontakt informatiion are taken from database something like that:

<?php echo get_user_meta( $userid, $metakey ); ?>

where userid is id of actual user and metakey is name of key in database (i think it will be like 'facebook', 'url' or something like that

so find this and change to condition like this


<?php if ("" != get_user_meta( $userid, $metakey )) { echo get_user_meta( $userid, $metakey ); } ?>


of course replace userid and metakey

2.

but answer for second question i think is strongly relevant to mistake in code which you have, so i really think it would be better to show us the code :)

2010-06-05

Andrzej answers:

Hey, I'll by happy to help you - can you send me your ftp data by private message?