Forum Moderators: coopster

Message Too Old, No Replies

PHP Code Snippet

         

almo136

9:52 pm on Aug 5, 2009 (gmt 0)

10+ Year Member



Hi I have this code which outputs the author of a posts aim id in wordpress:

<?php the_author_meta('aim'); ?>

What I would like to do is replace the question mark below with the value from the above code.

<?php
aim_tracks('?', 7, false, true, false, false);
?>

I tried this but it didn't work:

<?php
$aim = the_author_meta('aim');
aim_tracks($aim, 7, false, true, false, false);
?>

Any ideas?
Thanks!

eelixduppy

11:52 pm on Aug 5, 2009 (gmt 0)



Try to use this:

aim_tracks(get_the_author_meta('aim'), 7, false, true, false, false);

The problem was the_author_meta() echo's the data, whereas get_the_author_meta() returns it.

almo136

12:26 am on Aug 6, 2009 (gmt 0)

10+ Year Member



perfect. Thank you.