Able to show guest author name twice in one post?
-
Hi, I like your plugin, but I only got it to work partially on my website.
My theme displays an author box at the bottom of a post. The guest author is shown there as it should.
However, in the title area it still shows the original author. Is this a limitation of the plugin or is my code not compatible? This is what the title area uses for displaying author name:
<?php if ( $author_name ) : ?><span class=”author”>post->post_author ) ) ?>”><?php echo get_the_author_meta( ‘display_name’, $wp_query->post->post_author ) ?></span><?php endif; ?>
I tried to replace a part of this code with the following, but that would return a wrong author (the default author instead of this post author, and still no sign of the guest author)
<?php $author_id = get_the_author_meta( ‘ID’ ); echo get_the_author_meta( ‘display_name’, $author_id ) ?>(in the example url I now temporarily have both codes active)
The page I need help with: [log in to see the link]
- The topic ‘Able to show guest author name twice in one post?’ is closed to new replies.