I am using a customized theme and there is a line of code like this in for example single.php.
<p class="postmetadata"><?php _e('Posted by','Mimbo'); ?> <?php the_author_meta('namefl'); ?> <?php _e('on','Mimbo'); ?> <?php the_time('n/d/y'); ?> • <?php _e('Categorized as','Mimbo'); ?> <?php the_category(',') ?></p>
The call to wordpress function the_author_meta(‘namefl’) doesn’t return anything, thus the author name is blank;; display something like was posted by on 11/12/11 for example.
All I would like to do is to display the author name in there. I am using WP 3.2.1. What is the best way to fix this?
You should familiarize yourself with the WordPress codex as well as http://wordpress.stackexchange.com. That site is better at answering codex questions. SO is for programming questions.
Read this:
http://codex.wordpress.org/
Use this to solve your problem (has to be used inside the loop)
http://codex.wordpress.org/Function_Reference/the_author