Adding Author Name, But Removing Date

Hi,

How can I add the author name, but remove the date on my blog posts?

I’d like the author name to appear in the individual posts as well, not just the summary page. I’ve been able to get the date and the name to appear on the summary page, but it doesn’t show up on the individual posts. But I’m looking to have just the author name, no date, on the summary page as well as the individual posts.

Thanks

Oh, I am using the Unite Theme! Thanks

Hi @kbeamon,

I hope you are well today and thank you for your question.

By default in the Unite theme the post author name and date is displayed on the summary page as well as the individual posts as shown in this demo here https://colorlib.com/unite/blog/

You can have just the author name, no date on the summary page as well as the individual posts by adding the following code in the functions.php file of your child theme or just use the attached child theme that contains the following code.


/**
 * Prints HTML with meta information for the current post-date/time and author.
 */
function unite_posted_on() {

	printf( '<span class="byline"> <i class="fa fa-user"></i> %1$s</span>',
		sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
			esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
			esc_html( get_the_author() )
		)
	);
}

Best Regards,
Movin

Hi,

Thanks for your response!

I added the code to the functions.php file. It removed the date on both the summary and blog pages, but did not add the author. Any thoughts on how to add that?

Thanks!

Hi @kbeamon,

Thank you for your reply.

The author is added by default as shown in the Unite theme demo here https://colorlib.com/unite/blog/ but i have to check your site to test why it’s not displaying for you.

Could you please share your site URL so that i can test it?

Regards,
Movin

Sure, my url is: www.homebusinesstelevision.com

Thanks!

Hi @kbeamon,

I checked your site and found some CSS is conflicting on your site which is hiding the author name.

To display the author name try adding the following CSS code in the Custom CSS option of your theme on the below path.

Admin Area -> Apperance -> Theme Options -> Other -> Custom CSS

body.blog .entry-meta .byline,
body.single .entry-meta {
  display: block;
}

Best Regards,
Movin

It Worked!

Thank you so much, :slight_smile:

You are most welcome here :slight_smile: