You didn't provide any of the output code for the search results output, so what I've provided below is a guess based on how things 'should' work - chances are things will look different in your theme so you'll need to sort out how to apply the same logic.
In your search results template (content-search.php
maybe?) you'll have your search results pulled in and they'll all be in a variable like so:
$search_query
That'll be the results of the search query (may be named something different)...
So in your while()
loop you'll want to check get the 'type' for each result:
$type = $search_query->post->post_type;
Then before you output the HTML and data for the post meta, you'll check to see if the type matches post
, like so:
if( $type == 'post' ) :
//your post meta output code
endif;
Putting the whole thing together... and remember, lots of guesswork in here:
<?php
while( $search_query->have_posts() ) {
$search_query->the_post();
$type = $search_query->post->post_type;
the_title();
if( $type == 'post' ) :
echo '<div class="jeg_post_meta">';
echo 'By ' . the_author_posts_link() . 'on ' . the_time( 'F jS, Y' ) . 'in ' . the_category( ', ' ) . '.';
echo '</div>';
endif;
echo '<div class="jeg_post_content">';
the_excerpt();
echo '</div>';
}
?>
Just a reminder though that you shouldn't be editing a third-party theme because your edits will get lost if/when it updates and you'll have to start over. So you want to do this in a child theme where you're overriding existing templates and content parts.