WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] the same author on a category (3 posts)

  1. Rom
    Member
    Posted 4 years ago #

    Hi.

    I have two categories on my site (http://www.ohnoono.com): news and blog.

    I would like to have the authors name on all blog posts. But on a news post it would be cool if the author is just admin, oh no ono or something like that. Can i do this without having to make a user for that purpose only?

  2. MichaelH
    Member
    Posted 4 years ago #

    Using the template tag, the_author(), or the_author_posts_link(), allows you to display an author name.
    A Conditional Tag such as in_category could be used to display "admin" if a post is in a particular category.

    Related:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

  3. Rom
    Member
    Posted 4 years ago #

    great, thank you

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags