Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there,

    The issue is that WordPress’ underlying RSS parsing framework (SimplePie) isn’t separating the name and email address from within the author tag. As a result, the author’s name remains empty and so we don’t print out the author.

    I wrote a workaround that you can insert into your theme’s functions.php file. What it does is set the feed item’s author to be pulled from the email field which is where SimplePie is storing the full information. Note that I only execute this for the feed source with ID 10253; you’ll have to change that to the ID of the Fitzmartin feed source you’ve created.

    add_action( 'wprss_items_create_post_meta', 'my_change_author', 10, 3);
    function my_change_author($inserted_ID, $item, $feed_ID) {
    	if ( intval($feed_ID) === 10253 ) {
    		$author = $item->get_author();
    		if ( $author ) {
    			update_post_meta( $inserted_ID, 'wprss_item_author', $author->get_email() );
    		}
    	}
    }

    If you want to change how the author is shown on the front-end, you can use the wprss_item_author and wprss_author_prefix_text filters that we define. That’ll let you split up the author name and address or hyperlink it if you want.

    Cheers,
    Mark

    Thread Starter owensdev

    (@owensdev)

    Awesome, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘author not showing up’ is closed to new replies.