Author name needed to appear with each post but not doing it
-
Ok I am really new at this but would like my posts to have the authors name listed below their posts and right now they do not show up.
Just installed WP a week ago 1-10-07.
With this in mind, I have read it needs to go in the “loop”, wich I assume is index.php but not understanding, when I open this file, where exactly do I insert the following
<?php
global $wp_query;
$author = $wp_query->get_queried_object();
echo $author->user_firstname . ‘ ‘ . $author->user_lastname;
?>If someone could paste in exactly the code that I should see in this index.php file that would come right before the ABOVE code is inserted, and also paste the code I should see that would be showing right AFTER it, I’d sure appreciate it.
Also is the above code correct for the version I have installed if its only been a week ago?
Just want to make sure I am doing this right.
Anything else I have to do to enable / allow it to display or will this take care of it?
- The topic ‘Author name needed to appear with each post but not doing it’ is closed to new replies.