The thumbnail and title shows up as it should, but the post meta displays on the top of the page. What is the correct code for retrieve the post metadata?
function evasmat_posts_shortcode(){
$q = new WP_Query(
array( 'orderby' => 'date', 'posts_per_page' => '4')
);
$list="<div class="cards">";
while($q->have_posts()) : $q->the_post();
$list .= '<div class="card">' . get_the_post_thumbnail() . '<h2 class="entry-title-index"><a href="'.get_permalink().'">'.get_the_title() .'</a></h2>' .'<div class="entry-meta">' . get_post_meta (evasmat_posted_on() ) .'</div></div>';
endwhile;
wp_reset_query();
return $list . '</div>';
}
add_shortcode('recent-posts', 'evasmat_posts_shortcode');