Byline

Post author and post info

Last modified: May 11, 2023

link Block name

t2/byline

link Filters

link Template

The full template returned by the render callback function can be overwritten using the t2/block/byline/template filter.

link Author

The filter t2/block/byline/author has been added to replace the author name, for instance if using Co Authors Plus.

link Author role

The block has a custom filter t2/block/byline/author_role to override the author role value, if you want to dynamically get this value from user meta or another source.

Usage

\add_filter('t2/block/byline/author_role', function($role) {
	if (!empty($role)) {
		return $role;
	}
	return 'My Custom Role';
});

link Author avatar

By default, when avatar display is enabled it gets the default profile avatar. You can override this with the t2/block/byline/author_avatar filter.

Usage

\add_filter('t2/block/byline/author_role', function() {

	return '<img src="" alt="" />';
});

link Style properties