Use this code for the loop. I removed your comments and added some for clarification.
<?php
if ( have_posts() ) {
// Do first post.
add_filter( 'the_content', 'narga_excerpts' );
add_filter( 'the_content', 'remove_first_image' );
the_post();
get_template_part( 'content', get_post_format() );
// Do remaining posts.
remove_filter( 'the_content', 'narga_excerpts' );
remove_filter( 'the_content', 'remove_first_image' );
while ( have_posts() ) {
the_post();
get_template_part( 'content', get_post_format() );
}
}
?>
</div>
</div>
<?php
// Add remove filter first image.
function remove_first_image( $content ) {
return preg_replace( '/<img[^>]+\>/i', '', $content, 1 );
}
You didn’t give enough details on the <div>
s you want to wrap the posts with, so I left that part off. I also removed the function definition in the loop. Place your functions at the bottom of the file.