Hello Mark,
I’m wondering why would you want to use the built in WordPress get_the_excerpt() function? Is there something you need from get_the_excerpt() the plugin isn’t doing right now?
The main issue when using the default WordPress excerpt function is that it can’t iterate when used outside of the loop, which means you will have to iterate and switch between blogs in order to pull all excerpts correctly.
I’ve created a quick solution in case you want to use it, please keep a copy of your customizations because they will be erased when updating the plugin:
1.- Replace the nlp_custom_excerpt by this one:
function nlp_custom_excerpt($id,$blog_key){
// Switch to the blog ID
switch_to_blog($blog_key);
// Get the post by post ID
$post = get_post($id);
// Go back to the current blog
restore_current_blog();
// This was taken from the WordPress Codex get_the_excerpt filter
if ( post_password_required() ) {
return __( 'There is no excerpt because this is a protected post.' );
}
// Check if an excerpt was found
if( !empty( $post->post_excerpt ) ) {
// Apply the WordPress excerpt filter and return the content
return apply_filters( 'get_the_excerpt', $post->post_excerpt );
} else {
// If empty then return null..
return;
}
}
2.- Replace lines 737, 796, 963 & 1022 by this one:
echo nlp_custom_excerpt($field->ID,$all_blogkeys[$field->guid]);
To test if it works you could set your shortcode like this one:
[nlposts title_only=false]
This is a quick snippet, you may want to customize it even more, I hope this points you in the right direction.
Best regards,
José Luis.