Remove Author Name & Comments Link In Post Info On Home Page Only

I was asked recently how to remove the author name and comments link from the post info on the home page only so i thought i should also share the code with all my lovely readers!

I tried doing this with CSS code but it leaves the by text which must be hard coded into Genesis or WordPress.

Here’s the PHP code you can simply copy from the view raw link and paste at the end of your child themes functions.php file.

This code uses the is_front_page() conditional tag meaning only the post info on the front page of your website will modified and all other archives like your blog & category archives will not be effected.

More Ways To Remove Post Info


Comments

2 responses to “Remove Author Name & Comments Link In Post Info On Home Page Only”

  1. KONAN YAMADA Avatar
    KONAN YAMADA

    Hello, I have a question.
    Regarding above article, how should I modify in case of Magazine Pro theme?
    I tried it on Magazine pro theme, but It still has remained “by” on my toppage.

    1. Brad Dalton Avatar
      Brad Dalton

      Hi, toppage? Which page are you referring to specifically?

      And which page did you want to remove by from?

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.