• Right now the code is returning empty author names when creating the index (at least with my config). I suggest to replace this code (line 303):

    $user = get_userdata( $post->post_author );
    
    		if ( $user instanceof WP_User ) {
    			$user_data = $user->display_name;
    		} else {
    			$user_data = '';
    		}

    with only this:

    $user_data = get_the_author_meta('display_name', $post->post_author);

    This way is simpler, fastest, and it works fine for me. ??

  • The topic ‘Fixes to code in preparePost function’ is closed to new replies.