Site logo

Archived topic

Author Box

11 replies · Started by ivar on April 25, 2019

Viewing posts 1–12 of 12

Thanks, it works, but...

how to remove date and add "category"?

when I uncheck "date" in the settings - the whole line disappears, and the categories appear after the article, not here

:)...and how to increase the indentation from the title?

Example page: https://hackhub.ru/kak-nachat-vesti-blog-s-nulya

Use this as your function instead:

add_filter( 'generate_post_author_output', function( $author) {
	printf( ' <span class="byline">%1$s</span>',
		sprintf( '<span class="author vcard" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="author">%4$s<a href="%1$s" title="%2$s" rel="author"><span class="author-name" itemprop="name">%3$s</span></a></span>',
			esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
			esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ),
			esc_html( get_the_author() ),
			get_avatar( get_the_author_meta( 'ID' ) )
		)
	);

	if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
		echo '<span class="comments-link">';
			comments_popup_link( __( 'Leave a comment', 'generatepress' ), __( '1 Comment', 'generatepress' ), __( '% Comments', 'generatepress' ) );
		echo '</span>';
	}

	$categories_list = get_the_category_list( ', ' );

	if ( $categories_list ) {
		printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
			esc_html_x( 'Categories', 'Used before category names.', 'generatepress' ),
			$categories_list
		);
	}
} );

Let me know :)

Great, thanks!

You're welcome :)

Hello, the question remains, can the question-How to increase the interval ?
screenshot

Try this:

header.entry-meta {
    margin-top: 30px;
}

unfortunately, it doesn't work...

Hi there,

small change to the CSS:

header .entry-meta {
    margin-top: 30px;
}

Great, thanks David!

Glad we could be of help

This archived topic is closed to new replies.