• Resolved tracyfh

    (@tracyfh)


    I want to keep the author on the posts from the blog page but not the news page. Does this make sense? I have this but it isn’t working:

    <span class=”postdate serif”><?php the_date(); ?></span>
    <php
    if(is_category(‘news’) || in_category(‘wellco-news’)){
    /*Do nothing*/
    }else{
    echo ” by” . the_author();
    } ?>

    THANKS!
    https://www.wellcocorp.com/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I can’t see any authors listed on the News page.

    Thread Starter tracyfh

    (@tracyfh)

    Thanks for your reply. Maybe I have the code REALLY wrong.

    I don’t want the author on the News page but I do on the Blog page. But when you click on that individual post – it doesn’t list the author from the blog page.

    Ah! I got it the wrong way around. Thought you were trying to remove authors from the News page.

    In single.php, try replacing:
    <?php the_author(); ?>

    with:

    <?php if( !in_category('wellco-news') ) the_author(); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘On single posts, keep author from blog page’ is closed to new replies.