Support » Plugin: Byline » Adjusting custom code to properly show author

  • Hi,

    I am facing the problem that many others faced before. My author is displayed as: a href=”http://link to byline” rel=”tag”>name of author</a

    As suggested before, I tried to replace the function with the_author but as I am a total beginner, I struggled and horribly failed! Could you tell me if this is the code I need to adjust? (located in template-tag.phps) (I am using the Theme ‘Match’, which basically has no support)

    if ( ! function_exists( 'match_posted_on' ) ) :
     * Prints HTML with meta information for the current post-date/time and author.
    function match_posted_on() {
    	$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
    	if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
    		$time_string .= '<time class="updated" datetime="%3$s">%4$s</time>';
    	$time_string = sprintf( $time_string,
    		esc_attr( get_the_date( 'c' ) ),
    		esc_html( get_the_date() ),
    		esc_attr( get_the_modified_date( 'c' ) ),
    		esc_html( get_the_modified_date() )
    	printf( __( '<span class="posted-on">Posted on %1$s</span><span class="byline"> by %2$s</span>', 'match' ),
    		sprintf( '<a href="%1$s" rel="bookmark">%2$s</a>',
    			esc_url( get_permalink() ),
    		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() )

    and if possible what I need to change in there to get the result I am looking for?

    Thanks in advance for the help!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Adjusting custom code to properly show author’ is closed to new replies.