• j.dominionated

    (@quickbeforeitmelts)


    This represents the author name and information and post date/time for a single blog post on my site:

    <span class="author vcard"><?php the_author_posts_link() ?></span> | <?php the_time('j F Y') ?>

    I would like the option to replace the author byline with a custom field I’ll be calling ‘byline’ for occasional/guest authors who will not be added to the site as users.

    Can anyone help me write the if/else statement into the code that would allow the ‘byline’ custom field to replace the author information when it’s present, or else display the author info as per normal when it’s not?

  • The topic ‘Need Help formulating an If / Else statement for Custom Field’ is closed to new replies.