• Hi,

    This is, I imagine, a simple fix, but I’m not sure how to code it (I’m a beginner). Essentially, the argument is, if in the post the author ID is 1 (i.e., the author is set to be the admin), display none of the following below. I don’t know whether it’s possible to do a conditional within a conditional. You might be able to kill the first two lines of this code if you figure out how to ensure neither the byline nor bytitle is displayed IF the author is the admin (Author ID = 1)

    Thanks

    <?php if (in_category(1) || in_category(52) || in_category(53) || in_category(53) || in_category(56)) : ?>
    
    <div class="byline">
    By <?php if(function_exists('coauthors_posts_links'))
          coauthors_posts_links();
    else
          the_author_posts_link(); ?>
    </div>
    <span class="bytitle">
          <?php echo c2c_get_custom('Bytitle'); ?>
    </span>
    
    <?php endif; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Conditional: Display no byline if author is admin’ is closed to new replies.