display a specific element based on who posted
-
hello guys,
on my site I have this page
https://www.elie-palima.com/make-money-online-writing-articles/
Below the title, you can see the post-info (BY ELIE PALIMA… etc)
besides my name, there’s this image linking to my Email address. This is exactly the effect that I want to accomplish.
However, on my other posts that I am not the author, ie guest bloggers page, I do not want to display that image
for example, on this page https://www.elie-palima.com/banner-exchange-programs/
the “email image” shows.. I do not want to display that there..
I was hoping you could help me out??
here’s the exact code I used:
<?php if (is_single()) {?> <div class="post-info">By [post_author] <a class="purchasead" href="mailto:<?php the_author_meta( 'user_email'); ?>" title="Author's Email (right click to copy)"><img src="https://www.elie-palima.com/wp-content/uploads/2012/03/email-icon.png" alt="Email" /></a> on [post_date] [post_comments] [post_edit] </div> <?php }?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘display a specific element based on who posted’ is closed to new replies.