WordPress.org

Ready to get started?Download WordPress

Forums

Hiding Admin Public Meta Data (1 post)

  1. Sebastien Sanz de Santamaria
    Member
    Posted 1 year ago #

    I post author meta data (name, description, url, etc.. ) on a single post template, for a member based listing site.

    While most of the generated posts are by members, some are made by the admin.. and as such I would like to hide the meta data when a post's author is admin.

    currently this is outside the loop in my single.php template

    <?php
        $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
        ?>
    <?php echo $curauth->user_nicename; ?>
    <?php echo $curauth->user_description; ?>
    <?php echo $curauth->user_url; ?>

    how can I edit this to hide the info when the author is admin?

    I tried looking at running a conditional tags thing, but didn't find anything for single posts.. only author pages.

    any help will be greatly appreciated.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by Sebastien Sanz de Santamaria
  • This topic is not resolved
  • WordPress version: 3.5

Tags