.arl-pr-grid { display:grid; gap:24px; }
.arl-pr-grid–hub { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.arl-pr-grid–location { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.arl-pr-card { border:1px solid #e5e5e5; border-radius:12px; overflow:hidden; background:#fff; transition:box-shadow .2s; }
.arl-pr-card:hover { box-shadow:0 6px 20px rgba(0,0,0,.08); }
.arl-pr-card__image { background-size:cover; background-position:center; aspect-ratio:16/10; }
.arl-pr-card__body { padding:14px 16px; }
.arl-pr-card__title { margin:0 0 6px; font-size:1.05rem; line-height:1.3; }
.arl-pr-card__meta { font-size:.85rem; color:#666; margin-bottom:8px; }
.arl-pr-card__cta { display:inline-block; margin-top:6px; font-weight:600; }
.arl-pr-pagination { text-align:center; margin-top:24px; }
.arl-pr-strip__heading { margin-bottom:8px; }
/* === MEDIA COVERAGE HUB GRID === */
function arl_media_coverage_grid_shortcode( $atts ) {
$atts = shortcode_atts([
‘category’ => ‘media-coverage’,
‘per_page’ => 8,
], $atts, ‘media_coverage_grid’);
// Pagination
$paged = get_query_var(‘paged’) ? get_query_var(‘paged’) : 1;
$q = new WP_Query([
‘post_type’ => ‘post’,
‘posts_per_page’ => intval($atts[‘per_page’]),
‘paged’ => $paged,
‘category_name’ => sanitize_text_field($atts[‘category’]),
‘orderby’ => ‘date’,
‘order’ => ‘DESC’
]);
ob_start();
echo ‘
‘;
if ( $q->have_posts() ) :
while ( $q->have_posts() ) : $q->the_post();
$img = get_the_post_thumbnail_url(get_the_ID(), ‘medium_large’);
$img = $img ? $img : ‘https://via.placeholder.com/640×400?text=Media+Coverage’; // fallback
echo ‘
‘;
echo ”;
echo ‘
‘;
echo ‘
‘;
echo ‘
‘ . esc_html( get_the_title() ) . ‘
‘;
echo ‘
‘ . esc_html( get_the_date() ) . ‘
‘;
echo ‘
‘ . esc_html( wp_strip_all_tags( get_the_excerpt(), true ) ) . ‘
‘;
echo ‘Read more’;
echo ‘
‘;
echo ‘
‘;
echo ‘
‘;
endwhile;
// Pagination
$big = 999999999;
echo ‘
‘;
echo paginate_links([
‘base’ => str_replace($big, ‘%#%’, esc_url(get_pagenum_link($big))),
‘format’ => ‘?paged=%#%’,
‘current’ => max(1, $paged),
‘total’ => $q->max_num_pages,
‘prev_text’ => ‘« Prev’,
‘next_text’ => ‘Next »’
]);
echo ‘
‘;