<p>This post was written by <?php the_author(); ?> - The Author.</p>
<?php echo get_avatar( get_the_author_meta( 'ID' ));?>
I can’t figure out why I can’t get an output. Neither of those will work. I’m just trying to display the author name so that I can style it.
Displaying other post data (title, meta, etc) work just fine.
I’m sure I’m missing something obvious.
The above first line just outputs as:
“This post was written by – The Author.”
The second line just outs the default avatar.
I’m using the ‘HOOK’ element. I have ensured that “Execute PHP” is checked.
I’m using a modified version of the ‘Merch’ template.
Was attempting various. I want it to display ‘after_header’ – and I was just adding to the “Single Post Entry Header” element that is added by the Merch template. That template already displays the title, categories, date.
Seems to only work if the HOOK selected is after_main_content or later?