• z4tchmo

    (@z4tchmo)


    Is it possible to hide the By [author] on specific posts? I would like to do this either for a specific author or perhaps for a specific category (whichever is easier). At the same time, I do not want to break anything in the theme. Hueman is an excellent theme and seems to do what it does flawlessly.

Viewing 1 replies (of 1 total)
  • As an example, you could edit single.php with a child theme and locate this part:

    <?php _e('by','hueman'); ?> <?php the_author_posts_link(); ?> ·

    Then add something like this around it:

    <?php $author = get_the_author(); if $author != 'john' : ?>
    <?php _e('by','hueman'); ?> <?php the_author_posts_link(); ?> ·
    <?php endif; ?>

    (Show for all except if author is john, then hide)

    Haven’t tested the code.

Viewing 1 replies (of 1 total)
  • The topic ‘Hide author "By" line for specific author or category’ is closed to new replies.