Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Want to Reformat Date and Author Reply To: Want to Reformat Date and Author

#3810
Tom
Keymaster

You could try:

1. Disabling the author output in the settings.

2. Adding this function:

add_filter( 'wpsp_date_output', 'tu_custom_wpsp_date_output' );
function tu_custom_wpsp_date_output( $output ) {
    $author = sprintf(
		'<span class="wp-show-posts-byline wp-show-posts-meta">
			<span class="wp-show-posts-author vcard" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="author">
				<a class="url fn n" href="%1$s" title="%2$s" rel="author" itemprop="url">
					<span class="author-name" itemprop="name">%3$s</span>
				</a>
			</span>
		</span>',
		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
		esc_attr( sprintf( __( 'View all posts by %s', 'wp-show-posts' ), get_the_author() ) ),
		esc_html( get_the_author() )
	);

	return $output . ' by ' . $author;
}

Let me know 🙂