Meta tags in shortcode
Since evasmat_posted_on() is a function in your theme, you don’t need to use get_post_meta to get the date. You can call the function directly so: 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>’ … Read more