• 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)
  • The author name is available inside the function that processes the shortcode [post_author]. You should be able to modify that function to return the link only if you are the author, and remove it from the code you showed.

    have you asked at your commercial theme’s seller’s dedicated forum https://www.studiopress.com/support/

    without free access to all theme files, this forum here is not really able to help with problems accurring with commercial themes.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘display a specific element based on who posted’ is closed to new replies.