Site logo

Archived topic

Help with formatting author profile picture in post template

7 replies · Started by Matthew on January 23, 2023

Viewing posts 1–8 of 8

Hi Matthew,

The simplest way you can visually build your own Post Meta is by using a Block Element: https://docs.generatepress.com/article/block-element-post-meta-template/

Alternatively, you can try adding this snippet:

add_filter('generate_header_entry_meta_items', function($output){
	if(is_single()){
		return array(
			'author',
			'date',
		);
	}
	return $output;
}, 10);

Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets

Then, we'll try achieving it through custom CSS.

Many thanks Fernando, the snippet code did the trick.

One more quick question, please ...how can I increase the font size of that section i.e. the author name and published date?

Cheers,
Matthew

Perfect, thanks again Fernando :)

You're welcome, Matthew!

If you still want to change the alignment of the text, here's something you can try adding in Appearance > Customize > Additional CSS:

.single-post .entry-meta {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    height: 96px;
    justify-content: center;
}

.single-post .entry-meta {
    width: fit-content;
}

Fantastic, thanks Fernando ...just what I was looking for :)

You're welcome, Matthew!

This archived topic is closed to new replies.