Some PHP help for Co-Authors Plugin
-
I’m a newspaper reporter with limited coding experience. I’m designing a newspaper Web site using WordPress — and I need some coding help. I’m using the the “Co-Authors” plugin. A little background: At our paper, we have two “bytitles” for reporters: either they’re “Collegian Reporter” or “Collegian Staff.” That designation is defined in the “nickname” section of their user profile. But when a story has multiple authors I want the bytitle to be “Collegian Reporters.” So, this is what I coded:
<div class=”byline”>
<?php if(function_exists(‘coauthors_posts_links’))
coauthors_posts_links();
else
the_author_posts_link(); ?>
</div><span class=”bytitle”>
<?php if(function_exists(‘coauthors’))
echo ‘Collegian Reporters’;
else
echo ‘the_author_nickname();’ ?>
</span>The “byline” code either posts the author’s name or names if there are multiple authors as links to their previous stories. In the bytitle part, I essentially want to say: “If there are multiple authors for the post, make the bytitle say ‘Collegian reporters.’ Otherwise (if there’s a single author), use the single author’s nickname.”
Can anyone help?
Thanks!
- The topic ‘Some PHP help for Co-Authors Plugin’ is closed to new replies.