1. Full-Width Hero Banner

[full_width_hero category=”” tags=”” posts_per_page=”1″ offset=”0″ orderby=”date” order=”DESC” unique_group=”hero1″ title_color=”#ffffff” show_excerpt=”yes” excerpt_length=”25″ show_category=”yes” border_radius=”0″ padding=”0″ custom_class=””]
function np_full_width_hero_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'tags' => '', 'post_type' => 'post', 'posts_per_page' => 1, 'offset' => 0,
'orderby' => 'date', 'order' => 'DESC', 'unique_group' => 'hero1',
'title_color' => '#ffffff', 'bg_color' => 'transparent', 'aspect_ratio' => '16:9',
'show_title' => 'yes', 'show_excerpt' => 'yes', 'excerpt_length' => 25,
'show_date' => 'no', 'show_category' => 'yes', 'border_radius' => '0',
'padding' => '0', 'custom_class' => ''
), $atts);
$args = array(
'post_type' => sanitize_text_field($atts['post_type']),
'posts_per_page' => intval($atts['posts_per_page']),
'offset' => intval($atts['offset']),
'orderby' => sanitize_text_field($atts['orderby']),
'order' => sanitize_text_field($atts['order'])
);
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
if (!empty($atts['tags'])) $args['tag'] = sanitize_text_field($atts['tags']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
ob_start(); ?>
<style>
.np-hero-full {position:relative;height:85vh;min-height:580px;background-size:cover;background-position:center;display:flex;align-items:center;color:#fff;overflow:hidden;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;padding:<?php echo esc_attr($atts['padding']); ?>px;background-color:<?php echo esc_attr($atts['bg_color']); ?>;}
.np-hero-full::before {content:"";position:absolute;inset:0;background:linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.75) 100%);}
.np-hero-content {position:relative;z-index:2;max-width:1100px;margin:0 auto;padding:0 20px;width:100%;}
.np-hero-category {background:#c8102e;color:#fff;padding:6px 18px;font-size:14px;display:inline-block;margin-bottom:15px;border-radius:4px;}
.np-hero-title {font-size:clamp(2.2rem, 5vw, 4.2rem);line-height:1.15;font-weight:800;margin:0 0 20px;}
.np-hero-excerpt {font-size:1.15rem;max-width:620px;margin-bottom:25px;}
.np-hero-readmore {background:#c8102e;color:#fff;padding:14px 32px;border-radius:6px;text-decoration:none;font-weight:600;transition:all .3s;}
.np-hero-readmore:hover {background:#a00d24;transform:translateY(-3px);}
@media (max-width:768px) {.np-hero-full {height:70vh;}}
</style>
<div class="np-hero-full <?php echo esc_attr($atts['custom_class']); ?>" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($query->posts[0]->ID, 'full')); ?>');">
<div class="np-hero-content">
<?php
$post = $query->posts[0];
setup_postdata($post);
$cat = get_the_category($post->ID);
?>
<?php if ($atts['show_category'] === 'yes' && $cat) : ?>
<div class="np-hero-category"><?php echo esc_html($cat[0]->name); ?></div>
<?php endif; ?>
<?php if ($atts['show_title'] === 'yes') : ?>
<h1 class="np-hero-title" style="color:<?php echo esc_attr($atts['title_color']); ?>;">
<?php echo esc_html(get_the_title()); ?>
</h1>
<?php endif; ?>
<?php if ($atts['show_excerpt'] === 'yes') : ?>
<p class="np-hero-excerpt"><?php echo wp_kses_post(wp_trim_words(get_the_excerpt(), intval($atts['excerpt_length']))); ?></p>
<?php endif; ?>
<a href="<?php echo esc_url(get_permalink()); ?>" class="np-hero-readmore">বিস্তারিত পড়ুন →</a>
</div>
</div>
<?php wp_reset_postdata();
return ob_get_clean();
}
add_shortcode('full_width_hero', 'np_full_width_hero_shortcode'); 2. Split-Screen Hero

[split_screen_hero category=”” posts_per_page=”2″ offset=”0″ unique_group=”hero2″ title_color=”#111″ show_title=”yes” border_radius=”0″ padding=”0″ custom_class=””]
function np_split_screen_hero_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 2, 'offset' => 0, 'unique_group' => 'hero2',
'title_color' => '#111', 'aspect_ratio' => '4:3', 'show_title' => 'yes',
'show_date' => 'no', 'border_radius' => '0', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array(
'post_type' => 'post',
'posts_per_page' => intval($atts['posts_per_page']),
'offset' => intval($atts['offset']),
'orderby' => 'date',
'order' => 'DESC'
);
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if ($query->post_count < 2) return '';
$posts = $query->posts;
ob_start(); ?>
<style>
.np-split-hero {display:grid;grid-template-columns:1fr 1fr;gap:0;height:680px;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-split-left,.np-split-right {position:relative;background-size:cover;background-position:center;display:flex;align-items:end;padding:50px 40px;color:#fff;}
.np-split-left::before,.np-split-right::before {content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(0,0,0,0.8));}
.np-split-content {position:relative;z-index:2;}
.np-split-title {font-size:2.1rem;line-height:1.2;font-weight:700;margin:0;}
@media (max-width:992px) {.np-split-hero {grid-template-columns:1fr;height:auto;}}
</style>
<div class="np-split-hero <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-split-left" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($posts[0]->ID,'large')); ?>');">
<div class="np-split-content">
<?php if ($atts['show_title'] === 'yes') : ?>
<h2 class="np-split-title" style="color:<?php echo esc_attr($atts['title_color']); ?>;"><?php echo esc_html(get_the_title($posts[0])); ?></h2>
<?php endif; ?>
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:#c8102e;font-weight:600;">বিস্তারিত →</a>
</div>
</div>
<div class="np-split-right" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($posts[1]->ID,'large')); ?>');">
<div class="np-split-content">
<?php if ($atts['show_title'] === 'yes') : ?>
<h2 class="np-split-title" style="color:<?php echo esc_attr($atts['title_color']); ?>;"><?php echo esc_html(get_the_title($posts[1])); ?></h2>
<?php endif; ?>
<a href="<?php echo esc_url(get_permalink($posts[1])); ?>" style="color:#c8102e;font-weight:600;">বিস্তারিত →</a>
</div>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('split_screen_hero', 'np_split_screen_hero_shortcode'); 3. Multi-Column Grid

[multi_column_grid category=”” posts_per_page=”6″ columns=”3″ offset=”0″ unique_group=”grid1″ title_color=”#111″ show_title=”yes” show_excerpt=”yes” excerpt_length=”15″ show_date=”yes” show_category=”yes” border_radius=”8″ padding=”0″ custom_class=””]
function np_multi_column_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'columns' => 3, 'offset' => 0,
'unique_group' => 'grid1', 'title_color' => '#111', 'show_title' => 'yes',
'show_excerpt' => 'yes', 'excerpt_length' => 15, 'show_date' => 'yes',
'show_category' => 'yes', 'border_radius' => '8', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array(
'post_type' => 'post',
'posts_per_page' => intval($atts['posts_per_page']),
'offset' => intval($atts['offset']),
'orderby' => 'date',
'order' => 'DESC'
);
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$cols = max(1, min(6, intval($atts['columns'])));
ob_start(); ?>
<style>
.np-multi-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:25px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 4px 15px rgba(0,0,0,0.08);transition:all .3s;}
.np-card:hover {transform:translateY(-8px);box-shadow:0 15px 30px rgba(200,16,46,0.15);}
.np-card img {width:100%;height:210px;object-fit:cover;}
.np-card-body {padding:18px;}
.np-card-title {font-size:1.15rem;line-height:1.35;font-weight:700;margin:0 0 10px;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-card-excerpt {font-size:0.95rem;color:#555;line-height:1.5;}
.np-card-meta {font-size:0.85rem;color:#777;margin-top:12px;}
</style>
<div class="np-multi-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post();
$cat = get_the_category(); ?>
<div class="np-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium', array('alt'=>esc_attr(get_the_title()))); ?></a>
<div class="np-card-body">
<?php if ($atts['show_category'] === 'yes' && $cat) : ?>
<div style="color:#c8102e;font-size:13px;margin-bottom:8px;"><?php echo esc_html($cat[0]->name); ?></div>
<?php endif; ?>
<?php if ($atts['show_title'] === 'yes') : ?>
<h3 class="np-card-title"><a href="<?php the_permalink(); ?>" style="color:inherit;text-decoration:none;"><?php the_title(); ?></a></h3>
<?php endif; ?>
<?php if ($atts['show_excerpt'] === 'yes') : ?>
<p class="np-card-excerpt"><?php echo wp_trim_words(get_the_excerpt(), intval($atts['excerpt_length'])); ?></p>
<?php endif; ?>
<?php if ($atts['show_date'] === 'yes') : ?>
<div class="np-card-meta"><?php echo get_the_date(); ?></div>
<?php endif; ?>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('multi_column_grid', 'np_multi_column_grid_shortcode'); 4. Masonry Waterfall Grid

[masonry_waterfall category=”” posts_per_page=”8″ offset=”0″ unique_group=”masonry1″ title_color=”#111″ show_title=”yes” show_date=”yes” border_radius=”10″ padding=”0″ custom_class=””]
function np_masonry_waterfall_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0,
'unique_group' => 'masonry1', 'title_color' => '#111', 'show_title' => 'yes',
'show_date' => 'yes', 'border_radius' => '10', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array(
'post_type' => 'post',
'posts_per_page' => intval($atts['posts_per_page']),
'offset' => intval($atts['offset']),
'orderby' => 'date',
'order' => 'DESC'
);
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-masonry {column-count:3;column-gap:22px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-masonry-item {break-inside:avoid;margin-bottom:22px;background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 6px 20px rgba(0,0,0,0.07);transition:transform .4s;}
.np-masonry-item:hover {transform:scale(1.03);}
.np-masonry-item img {width:100%;height:auto;display:block;}
.np-masonry-body {padding:18px;}
.np-masonry-title {font-size:1.1rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-masonry {column-count:2;}}
@media (max-width:640px) {.np-masonry {column-count:1;}}
</style>
<div class="np-masonry <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-masonry-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large', array('alt'=>esc_attr(get_the_title()))); ?></a>
<div class="np-masonry-body">
<?php if ($atts['show_title'] === 'yes') : ?>
<h3 class="np-masonry-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<?php endif; ?>
<?php if ($atts['show_date'] === 'yes') : ?>
<div style="margin-top:10px;font-size:0.85rem;color:#888;"><?php echo get_the_date(); ?></div>
<?php endif; ?>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('masonry_waterfall', 'np_masonry_waterfall_shortcode'); 5. Magazine-Style Layout

[magazine_style category=”” posts_per_page=”5″ offset=”0″ unique_group=”mag1″ title_color=”#111″ show_title=”yes” border_radius=”12″ padding=”0″ custom_class=””]
function np_magazine_style_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'mag1',
'title_color' => '#111', 'show_title' => 'yes', 'border_radius' => '12',
'padding' => '0', 'custom_class' => ''
), $atts);
$args = array(
'post_type' => 'post',
'posts_per_page' => intval($atts['posts_per_page']),
'offset' => intval($atts['offset']),
'orderby' => 'date',
'order' => 'DESC'
);
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if ($query->post_count == 0) return '';
$posts = $query->posts;
ob_start(); ?>
<style>
.np-mag {display:grid;grid-template-columns:2fr 1fr;gap:30px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-mag-featured {position:relative;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;}
.np-mag-featured img {width:100%;height:520px;object-fit:cover;}
.np-mag-featured .overlay {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000);padding:40px 30px;color:#fff;}
.np-mag-featured h2 {font-size:2rem;line-height:1.2;margin:0 0 15px;}
.np-mag-side {display:flex;flex-direction:column;gap:25px;}
.np-mag-side-item {display:flex;gap:18px;}
.np-mag-side-img {width:110px;flex-shrink:0;}
.np-mag-side-img img {width:100%;height:80px;object-fit:cover;border-radius:6px;}
.np-mag-side-title {font-size:1.05rem;line-height:1.35;font-weight:600;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-mag {grid-template-columns:1fr;}}
</style>
<div class="np-mag <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-mag-featured">
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a>
<div class="overlay">
<?php if ($atts['show_title'] === 'yes') : ?>
<h2><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:#fff;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h2>
<?php endif; ?>
</div>
</div>
<div class="np-mag-side">
<?php for($i=1; $i<$query->post_count; $i++) : ?>
<div class="np-mag-side-item">
<div class="np-mag-side-img">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'thumbnail'); ?></a>
</div>
<?php if ($atts['show_title'] === 'yes') : ?>
<h3 class="np-mag-side-title"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h3>
<?php endif; ?>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('magazine_style', 'np_magazine_style_shortcode'); 6. Horizontal Scroll Carousel

[horizontal_carousel category=”” posts_per_page=”8″ offset=”0″ unique_group=”carousel1″ title_color=”#111″ show_title=”yes” show_excerpt=”no” excerpt_length=”12″ show_date=”yes” show_category=”yes” border_radius=”12″ padding=”20″ custom_class=””]
function np_horizontal_carousel_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'carousel1',
'title_color' => '#111', 'show_title' => 'yes', 'show_excerpt' => 'no', 'excerpt_length' => 12,
'show_date' => 'yes', 'show_category' => 'yes', 'border_radius' => '12', 'padding' => '20', 'custom_class' => ''
), $atts);
$args = array(
'post_type' => 'post',
'posts_per_page' => intval($atts['posts_per_page']),
'offset' => intval($atts['offset']),
'orderby' => 'date',
'order' => 'DESC'
);
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
ob_start(); ?>
<style>
.np-carousel-wrapper {padding:<?php echo esc_attr($atts['padding']); ?>px 0;overflow:hidden;position:relative;}
.np-carousel {display:flex;gap:20px;overflow-x:auto;scroll-behavior:smooth;padding-bottom:20px;-webkit-overflow-scrolling:touch;}
.np-carousel::-webkit-scrollbar {height:6px;}
.np-carousel::-webkit-scrollbar-thumb {background:#c8102e;border-radius:10px;}
.np-carousel-card {min-width:280px;background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 4px 15px rgba(0,0,0,0.08);transition:transform .4s;}
.np-carousel-card:hover {transform:translateY(-12px);}
.np-carousel-card img {width:100%;height:180px;object-fit:cover;}
.np-carousel-body {padding:16px;}
.np-carousel-title {font-size:1.1rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin:0 0 8px;}
.np-carousel-meta {font-size:0.85rem;color:#777;}
</style>
<div class="np-carousel-wrapper <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-carousel" id="np_carousel_<?php echo esc_attr($atts['unique_group']); ?>">
<?php while($query->have_posts()) : $query->the_post();
$cat = get_the_category(); ?>
<div class="np-carousel-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium', array('alt'=>esc_attr(get_the_title()))); ?></a>
<div class="np-carousel-body">
<?php if ($atts['show_category'] === 'yes' && $cat) : ?>
<div style="color:#c8102e;font-size:13px;margin-bottom:6px;"><?php echo esc_html($cat[0]->name); ?></div>
<?php endif; ?>
<?php if ($atts['show_title'] === 'yes') : ?>
<h3 class="np-carousel-title"><a href="<?php the_permalink(); ?>" style="color:inherit;text-decoration:none;"><?php the_title(); ?></a></h3>
<?php endif; ?>
<?php if ($atts['show_date'] === 'yes') : ?>
<div class="np-carousel-meta"><?php echo get_the_date(); ?></div>
<?php endif; ?>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<script>
// Simple drag scroll enhancement (vanilla)
document.addEventListener('DOMContentLoaded', () => {
const carousel = document.getElementById('np_carousel_<?php echo esc_attr($atts['unique_group']); ?>');
if (carousel) {
let isDown = false, startX, scrollLeft;
carousel.addEventListener('mousedown', e => { isDown = true; startX = e.pageX - carousel.offsetLeft; scrollLeft = carousel.scrollLeft; });
carousel.addEventListener('mouseleave', () => isDown = false);
carousel.addEventListener('mouseup', () => isDown = false);
carousel.addEventListener('mousemove', e => {
if (!isDown) return;
e.preventDefault();
const x = e.pageX - carousel.offsetLeft;
const walk = (x - startX) * 2;
carousel.scrollLeft = scrollLeft - walk;
});
}
});
</script>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('horizontal_carousel', 'np_horizontal_carousel_shortcode'); 7. Breaking News Ticker

[breaking_ticker category=”” posts_per_page=”10″ offset=”0″ unique_group=”ticker1″ ticker_speed=”25″ bg_color=”#c8102e” title_color=”#ffffff” padding=”12″ custom_class=””]
function np_breaking_ticker_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 10, 'offset' => 0, 'unique_group' => 'ticker1',
'ticker_speed' => '25', 'bg_color' => '#c8102e', 'title_color' => '#ffffff', 'padding' => '12', 'custom_class' => ''
), $atts);
$args = array(
'post_type' => 'post',
'posts_per_page' => intval($atts['posts_per_page']),
'offset' => intval($atts['offset']),
'orderby' => 'date',
'order' => 'DESC'
);
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
ob_start(); ?>
<style>
.np-ticker {background:<?php echo esc_attr($atts['bg_color']); ?>;color:<?php echo esc_attr($atts['title_color']); ?>;padding:<?php echo esc_attr($atts['padding']); ?>px 0;overflow:hidden;white-space:nowrap;position:relative;}
.np-ticker-label {background:#000;color:#fff;padding:8px 20px;display:inline-block;font-weight:700;margin-right:20px;}
.np-ticker-content {display:inline-block;animation:np-ticker-slide <?php echo intval($atts['ticker_speed']); ?>s linear infinite;}
.np-ticker-item {display:inline-block;margin-right:40px;font-size:1.05rem;}
.np-ticker-item a {color:inherit;text-decoration:none;}
@keyframes np-ticker-slide {0%{transform:translateX(0);}100%{transform:translateX(-50%);}}
</style>
<div class="np-ticker <?php echo esc_attr($atts['custom_class']); ?>">
<span class="np-ticker-label">BREAKING</span>
<div class="np-ticker-content">
<?php while($query->have_posts()) : $query->the_post(); ?>
<span class="np-ticker-item">• <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></span>
<?php endwhile; ?>
<?php while($query->have_posts()) : $query->the_post(); ?> <!-- duplicate for seamless loop -->
<span class="np-ticker-item">• <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></span>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('breaking_ticker', 'np_breaking_ticker_shortcode'); 8. Overlay Magazine Cards

[overlay_magazine_cards category=”” posts_per_page=”4″ offset=”0″ unique_group=”overlay1″ title_color=”#ffffff” show_title=”yes” show_category=”yes” border_radius=”16″ padding=”0″ custom_class=””]
function np_overlay_magazine_cards_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'overlay1',
'title_color' => '#ffffff', 'show_title' => 'yes', 'show_category' => 'yes',
'border_radius' => '16', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-overlay-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-overlay-card {position:relative;height:380px;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.15);transition:transform .4s;}
.np-overlay-card:hover {transform:scale(1.04);}
.np-overlay-card img {width:100%;height:100%;object-fit:cover;transition:transform .6s;}
.np-overlay-card:hover img {transform:scale(1.1);}
.np-overlay-content {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,rgba(0,0,0,0.85));padding:30px 22px;color:#fff;}
.np-overlay-category {background:#c8102e;padding:4px 14px;font-size:13px;display:inline-block;margin-bottom:10px;border-radius:4px;}
.np-overlay-title {font-size:1.35rem;line-height:1.3;font-weight:800;}
</style>
<div class="np-overlay-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post();
$cat = get_the_category(); ?>
<div class="np-overlay-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large', array('alt'=>esc_attr(get_the_title()))); ?></a>
<div class="np-overlay-content">
<?php if ($atts['show_category'] === 'yes' && $cat) : ?>
<div class="np-overlay-category"><?php echo esc_html($cat[0]->name); ?></div>
<?php endif; ?>
<?php if ($atts['show_title'] === 'yes') : ?>
<h3 class="np-overlay-title"><a href="<?php the_permalink(); ?>" style="color:<?php echo esc_attr($atts['title_color']); ?>;"><?php the_title(); ?></a></h3>
<?php endif; ?>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('overlay_magazine_cards', 'np_overlay_magazine_cards_shortcode'); 9. Hero + Vertical Stack

[hero_vertical_stack category=”” posts_per_page=”5″ offset=”0″ unique_group=”herostack1″ title_color=”#111″ show_title=”yes” show_excerpt=”yes” excerpt_length=”18″ show_date=”yes” border_radius=”12″ padding=”30″ custom_class=””]
function np_hero_vertical_stack_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'herostack1',
'title_color' => '#111', 'show_title' => 'yes', 'show_excerpt' => 'yes', 'excerpt_length' => 18,
'show_date' => 'yes', 'border_radius' => '12', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if ($query->post_count == 0) return '';
$posts = $query->posts;
ob_start(); ?>
<style>
.np-hero-stack {display:grid;grid-template-columns:1fr 1fr;gap:30px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-hero-main {border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;position:relative;}
.np-hero-main img {width:100%;height:520px;object-fit:cover;}
.np-hero-main .content {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000);padding:40px;color:#fff;}
.np-stack-list {display:flex;flex-direction:column;gap:22px;}
.np-stack-item {display:flex;gap:18px;}
.np-stack-img img {width:120px;height:80px;object-fit:cover;border-radius:8px;}
.np-stack-title {font-size:1.1rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-hero-stack {grid-template-columns:1fr;}}
</style>
<div class="np-hero-stack <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-hero-main">
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a>
<div class="content">
<?php if ($atts['show_title'] === 'yes') : ?>
<h2 style="font-size:2rem;margin:0 0 12px;"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:#fff;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h2>
<?php endif; ?>
</div>
</div>
<div class="np-stack-list">
<?php for($i=1; $i<$query->post_count; $i++) : ?>
<div class="np-stack-item">
<div class="np-stack-img"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'thumbnail'); ?></a></div>
<?php if ($atts['show_title'] === 'yes') : ?>
<h3 class="np-stack-title"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h3>
<?php endif; ?>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('hero_vertical_stack', 'np_hero_vertical_stack_shortcode'); 10. Left Hero + Right List

[left_hero_right_list category=”” posts_per_page=”5″ offset=”0″ unique_group=”leftright1″ title_color=”#111″ show_title=”yes” border_radius=”0″ padding=”0″ custom_class=””]
function np_left_hero_right_list_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'leftright1',
'title_color' => '#111', 'show_title' => 'yes', 'border_radius' => '0', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if ($query->post_count < 2) return '';
$posts = $query->posts;
ob_start(); ?>
<style>
.np-left-right {display:grid;grid-template-columns:55% 45%;gap:30px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-left-hero {border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;position:relative;}
.np-left-hero img {width:100%;height:520px;object-fit:cover;}
.np-right-list {display:flex;flex-direction:column;gap:22px;}
.np-right-item {display:flex;gap:16px;}
.np-right-item img {width:110px;height:75px;object-fit:cover;border-radius:6px;}
.np-right-title {font-size:1.05rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-left-right {grid-template-columns:1fr;}}
</style>
<div class="np-left-right <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-left-hero">
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a>
<?php if ($atts['show_title'] === 'yes') : ?>
<h2 style="position:absolute;bottom:20px;left:20px;color:#fff;font-size:1.8rem;margin:0;"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h2>
<?php endif; ?>
</div>
<div class="np-right-list">
<?php for($i=1; $i<$query->post_count; $i++) : ?>
<div class="np-right-item">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'thumbnail'); ?></a>
<?php if ($atts['show_title'] === 'yes') : ?>
<h3 class="np-right-title"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h3>
<?php endif; ?>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('left_hero_right_list', 'np_left_hero_right_list_shortcode'); 11. Card-Based Modular Grid

[card_modular_grid category=”” posts_per_page=”6″ columns=”3″ offset=”0″ unique_group=”modgrid1″ title_color=”#111″ show_title=”yes” show_excerpt=”yes” excerpt_length=”15″ show_date=”yes” border_radius=”12″ padding=”25″ custom_class=””]
function np_card_modular_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'columns' => 3, 'offset' => 0,
'unique_group' => 'modgrid1', 'title_color' => '#111', 'show_title' => 'yes',
'show_excerpt' => 'yes', 'excerpt_length' => 15, 'show_date' => 'yes',
'border_radius' => '12', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-mod-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:25px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-mod-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 6px 20px rgba(0,0,0,0.1);transition:all .3s;}
.np-mod-card:hover {box-shadow:0 20px 40px rgba(200,16,46,0.18);}
.np-mod-card img {width:100%;height:200px;object-fit:cover;}
.np-mod-body {padding:20px;}
.np-mod-title {font-size:1.2rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-mod-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-mod-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium', array('alt'=>esc_attr(get_the_title()))); ?></a>
<div class="np-mod-body">
<?php if ($atts['show_title'] === 'yes') : ?>
<h3 class="np-mod-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<?php endif; ?>
<?php if ($atts['show_date'] === 'yes') : ?>
<div style="margin-top:12px;font-size:0.9rem;color:#777;"><?php echo get_the_date(); ?></div>
<?php endif; ?>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('card_modular_grid', 'np_card_modular_grid_shortcode'); 12. Minimal Borderless Stack

[minimal_borderless_stack category=”” posts_per_page=”6″ offset=”0″ unique_group=”borderless1″ title_color=”#111″ show_title=”yes” show_excerpt=”yes” excerpt_length=”20″ show_date=”yes” show_category=”yes” padding=”20″ custom_class=””]
function np_minimal_borderless_stack_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'borderless1',
'title_color' => '#111', 'show_title' => 'yes', 'show_excerpt' => 'yes', 'excerpt_length' => 20,
'show_date' => 'yes', 'show_category' => 'yes', 'padding' => '20', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-borderless {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-borderless-item {display:flex;gap:25px;align-items:flex-start;border-bottom:1px solid #eee;padding-bottom:25px;margin-bottom:25px;}
.np-borderless-item:last-child {border-bottom:none;margin-bottom:0;padding-bottom:0;}
.np-borderless-img {width:220px;flex-shrink:0;}
.np-borderless-img img {width:100%;height:140px;object-fit:cover;border-radius:8px;}
.np-borderless-content {flex:1;}
.np-borderless-title {font-size:1.25rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin:0 0 10px;}
.np-borderless-excerpt {color:#555;line-height:1.6;}
.np-borderless-meta {font-size:0.85rem;color:#777;margin-top:12px;}
@media (max-width:768px) {.np-borderless-item {flex-direction:column;}}
</style>
<div class="np-borderless <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); $cat = get_the_category(); ?>
<div class="np-borderless-item">
<div class="np-borderless-img"><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium', array('alt'=>esc_attr(get_the_title()))); ?></a></div>
<div class="np-borderless-content">
<?php if ($atts['show_category'] === 'yes' && $cat) : ?><div style="color:#c8102e;font-size:13px;"><?php echo esc_html($cat[0]->name); ?></div><?php endif; ?>
<?php if ($atts['show_title'] === 'yes') : ?><h3 class="np-borderless-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3><?php endif; ?>
<?php if ($atts['show_excerpt'] === 'yes') : ?><p class="np-borderless-excerpt"><?php echo wp_trim_words(get_the_excerpt(), intval($atts['excerpt_length'])); ?></p><?php endif; ?>
<?php if ($atts['show_date'] === 'yes') : ?><div class="np-borderless-meta"><?php echo get_the_date(); ?></div><?php endif; ?>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('minimal_borderless_stack', 'np_minimal_borderless_stack_shortcode'); 13. Photo Gallery Overlay

[photo_gallery_overlay category=”” posts_per_page=”6″ offset=”0″ unique_group=”gallery1″ title_color=”#fff” show_title=”yes” border_radius=”12″ padding=”20″ custom_class=””]
function np_photo_gallery_overlay_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'gallery1',
'title_color' => '#fff', 'show_title' => 'yes', 'border_radius' => '12', 'padding' => '20', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-gallery-overlay {display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-gallery-card {position:relative;height:320px;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;cursor:pointer;transition:transform .4s;}
.np-gallery-card:hover {transform:scale(1.05);}
.np-gallery-card img {width:100%;height:100%;object-fit:cover;transition:transform .6s;}
.np-gallery-card:hover img {transform:scale(1.12);}
.np-gallery-overlay-content {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000000cc);padding:25px 20px;color:#fff;opacity:0;transition:opacity .3s;}
.np-gallery-card:hover .np-gallery-overlay-content {opacity:1;}
.np-gallery-title {font-size:1.25rem;line-height:1.3;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-gallery-overlay <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-gallery-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large', array('alt'=>esc_attr(get_the_title()))); ?></a>
<div class="np-gallery-overlay-content">
<?php if ($atts['show_title'] === 'yes') : ?><h3 class="np-gallery-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3><?php endif; ?>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('photo_gallery_overlay', 'np_photo_gallery_overlay_shortcode'); 14. Sidebar Compact Widget

[sidebar_compact_widget category=”” posts_per_page=”5″ offset=”0″ unique_group=”sidebar1″ title_color=”#111″ show_title=”yes” show_date=”yes” padding=”15″ custom_class=””]
function np_sidebar_compact_widget_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'sidebar1',
'title_color' => '#111', 'show_title' => 'yes', 'show_date' => 'yes', 'padding' => '15', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-sidebar-compact {padding:<?php echo esc_attr($atts['padding']); ?>px;max-width:320px;margin:0 auto;}
.np-sidebar-item {display:flex;gap:12px;margin-bottom:18px;}
.np-sidebar-item:last-child {margin-bottom:0;}
.np-sidebar-img img {width:78px;height:62px;object-fit:cover;border-radius:6px;}
.np-sidebar-title {font-size:1rem;line-height:1.35;font-weight:600;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-sidebar-meta {font-size:0.8rem;color:#777;}
</style>
<div class="np-sidebar-compact <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-sidebar-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail', array('alt'=>esc_attr(get_the_title()))); ?></a>
<div>
<?php if ($atts['show_title'] === 'yes') : ?><h4 class="np-sidebar-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4><?php endif; ?>
<?php if ($atts['show_date'] === 'yes') : ?><div class="np-sidebar-meta"><?php echo get_the_date(); ?></div><?php endif; ?>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('sidebar_compact_widget', 'np_sidebar_compact_widget_shortcode'); 15. Zigzag Alternating Layout

[zigzag_alternating category=”” posts_per_page=”4″ offset=”0″ unique_group=”zigzag1″ title_color=”#111″ show_title=”yes” padding=”30″ custom_class=””]
function np_zigzag_alternating_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'zigzag1',
'title_color' => '#111', 'show_title' => 'yes', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-zigzag {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-zigzag-item {display:flex;gap:40px;align-items:center;margin-bottom:50px;}
.np-zigzag-item:nth-child(even) {flex-direction:row-reverse;}
.np-zigzag-img {flex:1;}
.np-zigzag-img img {width:100%;height:320px;object-fit:cover;border-radius:12px;}
.np-zigzag-text {flex:1;}
.np-zigzag-title {font-size:1.6rem;line-height:1.3;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-zigzag-item {flex-direction:column;}}
</style>
<div class="np-zigzag <?php echo esc_attr($atts['custom_class']); ?>">
<?php foreach($posts as $index => $post) : setup_postdata($post); ?>
<div class="np-zigzag-item">
<div class="np-zigzag-img"><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a></div>
<div class="np-zigzag-text">
<?php if ($atts['show_title'] === 'yes') : ?><h2 class="np-zigzag-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h2><?php endif; ?>
</div>
</div>
<?php endforeach; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('zigzag_alternating', 'np_zigzag_alternating_shortcode'); 16. Full-Bleed Section Divider

[full_bleed_divider category=”” posts_per_page=”1″ offset=”0″ unique_group=”divider1″ title_color=”#fff” padding=”80″ custom_class=””]
function np_full_bleed_divider_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'divider1',
'title_color' => '#fff', 'padding' => '80', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-full-bleed-divider {position:relative;height:420px;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;color:#fff;margin:40px 0;border-radius:8px;overflow:hidden;}
.np-full-bleed-divider::before {content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,0.4),rgba(200,16,46,0.5));}
.np-divider-content {position:relative;z-index:2;text-align:center;max-width:800px;padding:0 20px;}
.np-divider-title {font-size:2.8rem;line-height:1.2;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-full-bleed-divider <?php echo esc_attr($atts['custom_class']); ?>" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($post->ID, 'full')); ?>');">
<div class="np-divider-content">
<h2 class="np-divider-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h2>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('full_bleed_divider', 'np_full_bleed_divider_shortcode'); 17. Tabbed Category Switcher

[tabbed_category_switcher categories=”news,sports” posts_per_page=”6″ unique_group=”tabbed1″ title_color=”#111″ padding=”20″ custom_class=””]
function np_tabbed_category_switcher_shortcode($atts) {
$atts = shortcode_atts(array(
'categories' => '', 'posts_per_page' => 6, 'unique_group' => 'tabbed1',
'title_color' => '#111', 'padding' => '20', 'custom_class' => ''
), $atts);
$cat_slugs = !empty($atts['categories']) ? array_map('trim', explode(',', $atts['categories'])) : array('','');
ob_start(); ?>
<style>
.np-tabbed {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-tabs {display:flex;gap:8px;border-bottom:3px solid #c8102e;margin-bottom:25px;}
.np-tab {padding:12px 28px;cursor:pointer;font-weight:600;border-radius:6px 6px 0 0;transition:all .3s;}
.np-tab.active {background:#c8102e;color:#fff;}
.np-tab-content {display:none;}
.np-tab-content.active {display:block;}
.np-tab-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:22px;}
</style>
<div class="np-tabbed <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-tabs" id="np_tabs_<?php echo esc_attr($atts['unique_group']); ?>">
<?php foreach($cat_slugs as $i => $slug) : ?>
<div class="np-tab <?php echo $i===0 ? 'active' : ''; ?>" data-tab="<?php echo esc_attr($i); ?>"><?php echo $slug ? esc_html(ucfirst($slug)) : 'Latest'; ?></div>
<?php endforeach; ?>
</div>
<?php foreach($cat_slugs as $i => $slug) :
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'orderby'=>'date','order'=>'DESC');
if ($slug) $args['category_name'] = $slug;
$q = new WP_Query($args); ?>
<div class="np-tab-content <?php echo $i===0 ? 'active' : ''; ?>" id="np_tab_content_<?php echo esc_attr($atts['unique_group']); ?>_<?php echo $i; ?>">
<div class="np-tab-grid">
<?php while($q->have_posts()) : $q->the_post(); ?>
<div style="background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,0.06);">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div style="padding:16px;"><h4 style="color:<?php echo esc_attr($atts['title_color']); ?>;margin:0 0 8px;"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4></div>
</div>
<?php endwhile; wp_reset_postdata(); ?>
</div>
</div>
<?php endforeach; ?>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
const tabs = document.querySelectorAll('#np_tabs_<?php echo esc_attr($atts['unique_group']); ?> .np-tab');
tabs.forEach(tab => {
tab.addEventListener('click', () => {
tabs.forEach(t => t.classList.remove('active'));
tab.classList.add('active');
document.querySelectorAll('.np-tab-content').forEach(c => c.classList.remove('active'));
document.getElementById('np_tab_content_<?php echo esc_attr($atts['unique_group']); ?>_' + tab.dataset.tab).classList.add('active');
});
});
});
</script>
<?php return ob_get_clean();
}
add_shortcode('tabbed_category_switcher', 'np_tabbed_category_switcher_shortcode'); 18. Infinite Scroll Feed

[infinite_scroll_feed category=”” posts_per_page=”6″ offset=”0″ unique_group=”infinite1″ title_color=”#111″ padding=”20″ custom_class=””]
function np_infinite_scroll_feed_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'infinite1',
'title_color' => '#111', 'padding' => '20', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-infinite-feed {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-infinite-item {margin-bottom:40px;border-bottom:1px solid #eee;padding-bottom:30px;}
.np-infinite-item:last-child {border-bottom:none;}
</style>
<div class="np-infinite-feed <?php echo esc_attr($atts['custom_class']); ?>" id="np_infinite_<?php echo esc_attr($atts['unique_group']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-infinite-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<h3 style="color:<?php echo esc_attr($atts['title_color']); ?>;margin:15px 0 8px;"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<div style="color:#777;font-size:0.9rem;"><?php echo get_the_date(); ?></div>
</div>
<?php endwhile; ?>
</div>
<script>
// Infinite scroll demo using IntersectionObserver (vanilla)
document.addEventListener('DOMContentLoaded', () => {
let page = 2;
const container = document.getElementById('np_infinite_<?php echo esc_attr($atts['unique_group']); ?>');
const observer = new IntersectionObserver(entries => {
if (entries[0].isIntersecting) {
// In real use, replace with AJAX fetch to admin-ajax.php or REST API
console.log('Load more page ' + page);
page++;
}
});
observer.observe(container.lastElementChild);
});
</script>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('infinite_scroll_feed', 'np_infinite_scroll_feed_shortcode'); 19. Two-Column Mixed

[two_column_mixed category=”” posts_per_page=”5″ offset=”0″ unique_group=”mixed1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_two_column_mixed_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'mixed1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-two-mixed {display:grid;grid-template-columns:2fr 1fr;gap:30px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-mixed-featured {border-radius:16px;overflow:hidden;}
.np-mixed-list {display:flex;flex-direction:column;gap:22px;}
.np-mixed-small {display:flex;gap:15px;}
.np-mixed-small img {width:110px;height:80px;object-fit:cover;border-radius:8px;}
@media (max-width:992px) {.np-two-mixed {grid-template-columns:1fr;}}
</style>
<div class="np-two-mixed <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-mixed-featured"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a><h2 style="color:<?php echo esc_attr($atts['title_color']); ?>;margin-top:15px;"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h2></div>
<div class="np-mixed-list">
<?php for($i=1; $i<$query->post_count; $i++) : ?>
<div class="np-mixed-small">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'thumbnail'); ?></a>
<h4 style="color:<?php echo esc_attr($atts['title_color']); ?>;"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h4>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('two_column_mixed', 'np_two_column_mixed_shortcode'); 20. Three-Column Balanced

[three_column_balanced category=”” posts_per_page=”6″ offset=”0″ unique_group=”three1″ title_color=”#111″ show_excerpt=”yes” excerpt_length=”14″ border_radius=”10″ padding=”25″ custom_class=””]
function np_three_column_balanced_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'three1',
'title_color' => '#111', 'show_excerpt' => 'yes', 'excerpt_length' => 14, 'border_radius' => '10', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-three-balanced {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-three-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,0.08);transition:box-shadow .3s;}
.np-three-card:hover {box-shadow:0 18px 35px rgba(200,16,46,0.2);}
.np-three-card img {width:100%;height:200px;object-fit:cover;}
.np-three-body {padding:18px;}
.np-three-title {font-size:1.15rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-three-balanced <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-three-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-three-body">
<h3 class="np-three-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<?php if ($atts['show_excerpt'] === 'yes') : ?><p><?php echo wp_trim_words(get_the_excerpt(), intval($atts['excerpt_length'])); ?></p><?php endif; ?>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('three_column_balanced', 'np_three_column_balanced_shortcode'); 21. Asymmetric Hero Split

[asymmetric_hero_split category=”” posts_per_page=”3″ offset=”0″ unique_group=”asym1″ title_color=”#ffffff” show_title=”yes” show_excerpt=”yes” excerpt_length=”22″ border_radius=”0″ padding=”0″ custom_class=””]
function np_asymmetric_hero_split_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 3, 'offset' => 0, 'unique_group' => 'asym1',
'title_color' => '#ffffff', 'show_title' => 'yes', 'show_excerpt' => 'yes', 'excerpt_length' => 22,
'border_radius' => '0', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if ($query->post_count < 2) return '';
$posts = $query->posts;
ob_start(); ?>
<style>
.np-asym-split {display:grid;grid-template-columns:2fr 1fr;gap:0;height:620px;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-asym-main {position:relative;background-size:cover;background-position:center;display:flex;align-items:flex-end;}
.np-asym-main::before {content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(0,0,0,0.75));}
.np-asym-main-content {position:relative;z-index:2;padding:50px 40px;color:#fff;}
.np-asym-main-title {font-size:2.4rem;line-height:1.2;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-asym-side {display:flex;flex-direction:column;gap:12px;background:#f8f8f8;padding:20px;}
.np-asym-side-item {display:flex;gap:15px;}
.np-asym-side-img img {width:95px;height:68px;object-fit:cover;border-radius:6px;}
.np-asym-side-title {font-size:1.05rem;line-height:1.35;font-weight:700;}
@media (max-width:992px) {.np-asym-split {grid-template-columns:1fr;height:auto;}}
</style>
<div class="np-asym-split <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-asym-main" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($posts[0]->ID,'full')); ?>');">
<div class="np-asym-main-content">
<?php if ($atts['show_title'] === 'yes') : ?><h1 class="np-asym-main-title"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h1><?php endif; ?>
<?php if ($atts['show_excerpt'] === 'yes') : ?><p style="max-width:520px;"><?php echo wp_trim_words(get_the_excerpt($posts[0]), intval($atts['excerpt_length'])); ?></p><?php endif; ?>
</div>
</div>
<div class="np-asym-side">
<?php for($i=1; $i<$query->post_count; $i++) : ?>
<div class="np-asym-side-item">
<div class="np-asym-side-img"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'thumbnail'); ?></a></div>
<?php if ($atts['show_title'] === 'yes') : ?><h3 class="np-asym-side-title"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:#111;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h3><?php endif; ?>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('asymmetric_hero_split', 'np_asymmetric_hero_split_shortcode'); 22. Sticky Top Navigation + Hero

[sticky_top_hero category=”” posts_per_page=”1″ offset=”0″ unique_group=”stickyhero1″ title_color=”#ffffff” bg_color=”#c8102e” padding=”0″ custom_class=””]
function np_sticky_top_hero_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'stickyhero1',
'title_color' => '#ffffff', 'bg_color' => '#c8102e', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-sticky-hero {position:relative;height:78vh;min-height:520px;background-size:cover;background-position:center;display:flex;align-items:center;color:#fff;}
.np-sticky-hero::before {content:"";position:absolute;inset:0;background:linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(200,16,46,0.7) 100%);}
.np-sticky-nav {position:sticky;top:0;z-index:100;background:<?php echo esc_attr($atts['bg_color']); ?>;color:#fff;padding:14px 0;box-shadow:0 2px 10px rgba(0,0,0,0.1);}
.np-sticky-content {position:relative;z-index:2;max-width:1100px;margin:0 auto;padding:0 20px;}
.np-sticky-title {font-size:clamp(2.4rem,6vw,4.5rem);line-height:1.15;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-sticky-nav <?php echo esc_attr($atts['custom_class']); ?>"><div style="max-width:1100px;margin:0 auto;padding:0 20px;font-weight:700;">LIVE UPDATES • <?php echo esc_html(get_the_category($post->ID)[0]->name ?? 'News'); ?></div></div>
<div class="np-sticky-hero" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($post->ID,'full')); ?>');">
<div class="np-sticky-content">
<?php if ($atts['show_title'] !== 'no') : ?><h1 class="np-sticky-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h1><?php endif; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('sticky_top_hero', 'np_sticky_top_hero_shortcode'); 23. Live Blog Vertical Timeline

[live_blog_timeline category=”” posts_per_page=”5″ offset=”0″ unique_group=”timeline1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_live_blog_timeline_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'timeline1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-timeline {padding:<?php echo esc_attr($atts['padding']); ?>px 0;position:relative;}
.np-timeline::before {content:"";position:absolute;left:38px;top:0;bottom:0;width:4px;background:#c8102e;opacity:0.2;}
.np-timeline-item {display:flex;gap:30px;margin-bottom:50px;position:relative;}
.np-timeline-dot {width:28px;height:28px;background:#c8102e;border-radius:50%;flex-shrink:0;position:relative;z-index:2;display:flex;align-items:center;justify-content:center;color:#fff;font-size:13px;font-weight:700;}
.np-timeline-content {flex:1;background:#fff;border-radius:12px;padding:22px;box-shadow:0 6px 20px rgba(0,0,0,0.07);}
.np-timeline-title {font-size:1.35rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin:0 0 10px;}
.np-timeline-time {font-size:0.85rem;color:#c8102e;font-weight:600;}
</style>
<div class="np-timeline <?php echo esc_attr($atts['custom_class']); ?>">
<?php $i=1; while($query->have_posts()) : $query->the_post(); ?>
<div class="np-timeline-item">
<div class="np-timeline-dot"><?php echo $i++; ?></div>
<div class="np-timeline-content">
<div class="np-timeline-time"><?php echo get_the_date('d M, Y • H:i'); ?></div>
<h3 class="np-timeline-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('live_blog_timeline', 'np_live_blog_timeline_shortcode'); 24. Opinion Highlight Block

[opinion_highlight category=”” posts_per_page=”3″ offset=”0″ unique_group=”opinion1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_opinion_highlight_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 3, 'offset' => 0, 'unique_group' => 'opinion1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-opinion-block {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:#f9f9f9;border-left:6px solid #c8102e;}
.np-opinion-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:28px;}
.np-opinion-card {background:#fff;padding:28px;border-radius:12px;box-shadow:0 8px 25px rgba(0,0,0,0.08);}
.np-opinion-title {font-size:1.3rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin:0 0 16px;}
.np-opinion-author {display:flex;align-items:center;gap:12px;margin-top:20px;}
.np-opinion-author img {width:48px;height:48px;border-radius:50%;object-fit:cover;}
</style>
<div class="np-opinion-block <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-opinion-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-opinion-card">
<h3 class="np-opinion-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<div class="np-opinion-author">
<?php echo get_avatar(get_the_author_meta('ID'), 48); ?>
<div><strong><?php the_author(); ?></strong><br><small>Opinion</small></div>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('opinion_highlight', 'np_opinion_highlight_shortcode'); 25. Video-First Grid

[video_first_grid category=”” posts_per_page=”6″ offset=”0″ unique_group=”video1″ title_color=”#111″ border_radius=”14″ padding=”25″ custom_class=””]
function np_video_first_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'video1',
'title_color' => '#111', 'border_radius' => '14', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-video-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-video-card {position:relative;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.1);}
.np-video-card img {width:100%;height:210px;object-fit:cover;}
.np-video-play {position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:58px;height:58px;background:rgba(200,16,46,0.95);border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:22px;transition:all .3s;}
.np-video-card:hover .np-video-play {background:#a00d24;transform:translate(-50%,-50%) scale(1.1);}
.np-video-body {padding:16px;background:#fff;}
.np-video-title {font-size:1.12rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-video-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-video-card">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('medium'); ?>
<div class="np-video-play">▶</div>
</a>
<div class="np-video-body">
<h3 class="np-video-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('video_first_grid', 'np_video_first_grid_shortcode'); 26. Compact List View

[compact_list_view category=”” posts_per_page=”8″ offset=”0″ unique_group=”compact1″ title_color=”#111″ show_excerpt=”no” padding=”15″ custom_class=””]
function np_compact_list_view_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'compact1',
'title_color' => '#111', 'show_excerpt' => 'no', 'padding' => '15', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-compact-list {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-compact-item {display:flex;gap:18px;align-items:center;padding:14px 0;border-bottom:1px solid #eee;}
.np-compact-item:last-child {border-bottom:none;}
.np-compact-img img {width:92px;height:68px;object-fit:cover;border-radius:6px;}
.np-compact-title {font-size:1.08rem;line-height:1.4;font-weight:600;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-compact-list <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-compact-item">
<div class="np-compact-img"><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a></div>
<h4 class="np-compact-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('compact_list_view', 'np_compact_list_view_shortcode'); 27. Featured Slider + Grid Below

[featured_slider_grid category=”” posts_per_page=”7″ offset=”0″ unique_group=”slidergrid1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_featured_slider_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 7, 'offset' => 0, 'unique_group' => 'slidergrid1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-slider-grid {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-featured-slider {position:relative;height:460px;border-radius:16px;overflow:hidden;margin-bottom:35px;}
.np-featured-slider img {width:100%;height:100%;object-fit:cover;}
.np-slider-content {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000);padding:40px;color:#fff;}
.np-slider-title {font-size:2.1rem;line-height:1.25;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-grid-below {display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:22px;}
</style>
<div class="np-slider-grid <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-featured-slider">
<img src="<?php echo esc_url(get_the_post_thumbnail_url($posts[0]->ID,'large')); ?>" alt="">
<div class="np-slider-content">
<h2 class="np-slider-title"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h2>
</div>
</div>
<div class="np-grid-below">
<?php for($i=1; $i<$query->post_count; $i++) : ?>
<div style="background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 4px 15px rgba(0,0,0,0.07);">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'medium'); ?></a>
<div style="padding:16px;"><h4 style="color:<?php echo esc_attr($atts['title_color']); ?>;margin:0;"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h4></div>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('featured_slider_grid', 'np_featured_slider_grid_shortcode'); 28. Dark Mode Overlay Cards

[dark_mode_overlay category=”” posts_per_page=”4″ offset=”0″ unique_group=”dark1″ title_color=”#ffffff” border_radius=”16″ padding=”25″ custom_class=””]
function np_dark_mode_overlay_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'dark1',
'title_color' => '#ffffff', 'border_radius' => '16', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-dark-overlay {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:#111;color:#ddd;}
.np-dark-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:22px;}
.np-dark-card {position:relative;height:380px;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;}
.np-dark-card img {width:100%;height:100%;object-fit:cover;transition:transform .5s;}
.np-dark-card:hover img {transform:scale(1.08);}
.np-dark-overlay-layer {position:absolute;inset:0;background:linear-gradient(transparent,rgba(0,0,0,0.9));}
.np-dark-content {position:absolute;bottom:0;padding:30px 25px;color:#fff;}
.np-dark-title {font-size:1.4rem;line-height:1.3;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-dark-overlay <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-dark-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-dark-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-dark-overlay-layer"></div>
<div class="np-dark-content">
<h3 class="np-dark-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('dark_mode_overlay', 'np_dark_mode_overlay_shortcode'); 29. Bordered Minimal Cards

[bordered_minimal_cards category=”” posts_per_page=”6″ offset=”0″ unique_group=”bordered1″ title_color=”#111″ border_radius=”8″ padding=”25″ custom_class=””]
function np_bordered_minimal_cards_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'bordered1',
'title_color' => '#111', 'border_radius' => '8', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-bordered-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-bordered-card {border:2px solid #eee;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;transition:all .3s;background:#fff;}
.np-bordered-card:hover {border-color:#c8102e;transform:translateY(-6px);}
.np-bordered-card img {width:100%;height:195px;object-fit:cover;}
.np-bordered-body {padding:20px;}
.np-bordered-title {font-size:1.18rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-bordered-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-bordered-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-bordered-body">
<h3 class="np-bordered-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('bordered_minimal_cards', 'np_bordered_minimal_cards_shortcode'); 30. Collage-Style Overlap

[collage_overlap category=”” posts_per_page=”5″ offset=”0″ unique_group=”collage1″ title_color=”#fff” padding=”40″ custom_class=””]
function np_collage_overlap_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'collage1',
'title_color' => '#fff', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-collage {padding:<?php echo esc_attr($atts['padding']); ?>px 0;position:relative;height:580px;}
.np-collage-item {position:absolute;border:6px solid #fff;box-shadow:0 12px 30px rgba(0,0,0,0.2);border-radius:12px;overflow:hidden;transition:transform .4s;}
.np-collage-item:hover {transform:scale(1.08);z-index:10;}
.np-collage-item img {width:100%;height:100%;object-fit:cover;}
.np-collage-item:nth-child(1) {width:42%;height:68%;top:10%;left:8%;}
.np-collage-item:nth-child(2) {width:38%;height:52%;top:18%;right:12%;}
.np-collage-item:nth-child(3) {width:34%;height:46%;bottom:12%;left:22%;}
.np-collage-item:nth-child(4) {width:28%;height:38%;top:52%;right:28%;}
.np-collage-item .overlay {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000);padding:20px;color:#fff;}
</style>
<div class="np-collage <?php echo esc_attr($atts['custom_class']); ?>">
<?php for($i=0; $i<min(4,$query->post_count); $i++) : ?>
<div class="np-collage-item" style="z-index:<?php echo 10-$i; ?>;">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'large'); ?></a>
<div class="overlay"><h4 style="margin:0;color:<?php echo esc_attr($atts['title_color']); ?>;"><?php echo esc_html(get_the_title($posts[$i])); ?></h4></div>
</div>
<?php endfor; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('collage_overlap', 'np_collage_overlap_shortcode'); 31. Hierarchical Importance Grid

[hierarchical_importance_grid category=”” posts_per_page=”7″ offset=”0″ unique_group=”hierarchy1″ title_color=”#111″ show_title=”yes” show_excerpt=”yes” excerpt_length=”18″ border_radius=”12″ padding=”30″ custom_class=””]
function np_hierarchical_importance_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 7, 'offset' => 0, 'unique_group' => 'hierarchy1',
'title_color' => '#111', 'show_title' => 'yes', 'show_excerpt' => 'yes', 'excerpt_length' => 18,
'border_radius' => '12', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if ($query->post_count == 0) return '';
$posts = $query->posts;
ob_start(); ?>
<style>
.np-hierarchy-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-hierarchy-item {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 6px 20px rgba(0,0,0,0.09);transition:all .4s;}
.np-hierarchy-item:hover {transform:translateY(-10px);box-shadow:0 20px 40px rgba(200,16,46,0.2);}
.np-hierarchy-item img {width:100%;height:240px;object-fit:cover;}
.np-hierarchy-body {padding:20px;}
.np-hierarchy-title {font-size:1.22rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-hierarchy-featured {grid-column:span 2;grid-row:span 2;}
.np-hierarchy-featured img {height:520px;}
@media (max-width:992px) {.np-hierarchy-featured {grid-column:span 1;grid-row:span 1;}}
</style>
<div class="np-hierarchy-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php
// First post is largest
if (isset($posts[0])) : setup_postdata($posts[0]); ?>
<div class="np-hierarchy-item np-hierarchy-featured">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-hierarchy-body">
<?php if ($atts['show_title'] === 'yes') : ?><h2 class="np-hierarchy-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h2><?php endif; ?>
<?php if ($atts['show_excerpt'] === 'yes') : ?><p><?php echo wp_trim_words(get_the_excerpt(), intval($atts['excerpt_length'])); ?></p><?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php for($i=1; $i<$query->post_count; $i++) : setup_postdata($posts[$i]); ?>
<div class="np-hierarchy-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-hierarchy-body">
<?php if ($atts['show_title'] === 'yes') : ?><h3 class="np-hierarchy-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3><?php endif; ?>
</div>
</div>
<?php endfor; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('hierarchical_importance_grid', 'np_hierarchical_importance_grid_shortcode'); 32. Sidebar + Main Content Split

[sidebar_main_split category=”” posts_per_page=”5″ offset=”0″ unique_group=”sidebar_main1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_sidebar_main_split_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'sidebar_main1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-sidebar-main {display:grid;grid-template-columns:1fr 320px;gap:35px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-main-content .np-main-card {margin-bottom:35px;border-bottom:1px solid #eee;padding-bottom:35px;}
.np-main-content .np-main-card:last-child {border-bottom:none;padding-bottom:0;margin-bottom:0;}
.np-main-card img {width:100%;height:380px;object-fit:cover;border-radius:12px;}
.np-main-title {font-size:1.85rem;line-height:1.3;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-sidebar-box {background:#fff;padding:25px;border-radius:12px;box-shadow:0 6px 20px rgba(0,0,0,0.08);}
.np-sidebar-title {font-size:1.15rem;color:#c8102e;font-weight:700;margin-bottom:18px;}
.np-sidebar-item {display:flex;gap:14px;margin-bottom:20px;}
.np-sidebar-item img {width:78px;height:62px;object-fit:cover;border-radius:6px;}
@media (max-width:992px) {.np-sidebar-main {grid-template-columns:1fr;}}
</style>
<div class="np-sidebar-main <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-main-content">
<?php if (isset($posts[0])) : setup_postdata($posts[0]); ?>
<div class="np-main-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<h2 class="np-main-title" style="margin-top:18px;"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h2>
</div>
<?php endif; ?>
</div>
<div class="np-sidebar-box">
<div class="np-sidebar-title">RELATED STORIES</div>
<?php for($i=1; $i<$query->post_count; $i++) : setup_postdata($posts[$i]); ?>
<div class="np-sidebar-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
<h4 style="margin:0;font-size:1.05rem;line-height:1.35;"><a href="<?php the_permalink(); ?>" style="color:#111;"><?php the_title(); ?></a></h4>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('sidebar_main_split', 'np_sidebar_main_split_shortcode'); 33. Parallax Scroll Hero

[parallax_scroll_hero category=”” posts_per_page=”1″ offset=”0″ unique_group=”parallax1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_parallax_scroll_hero_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'parallax1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-parallax-hero {height:82vh;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;color:#fff;}
.np-parallax-bg {position:absolute;inset:0;background-size:cover;background-position:center;background-attachment:fixed;transition:transform .1s linear;}
.np-parallax-content {position:relative;z-index:2;text-align:center;max-width:900px;padding:0 20px;}
.np-parallax-title {font-size:clamp(2.8rem,7vw,5.2rem);line-height:1.1;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-parallax-hero <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-parallax-bg" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($post->ID,'full')); ?>');" id="np_parallax_bg_<?php echo esc_attr($atts['unique_group']); ?>"></div>
<div class="np-parallax-content">
<?php if ($atts['show_title'] !== 'no') : ?><h1 class="np-parallax-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h1><?php endif; ?>
</div>
</div>
<script>
document.addEventListener('scroll', () => {
const bg = document.getElementById('np_parallax_bg_<?php echo esc_attr($atts['unique_group']); ?>');
if (bg) {
const scroll = window.scrollY * 0.5;
bg.style.transform = `translateY(${scroll}px)`;
}
});
</script>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('parallax_scroll_hero', 'np_parallax_scroll_hero_shortcode'); 34. Numbered List Ranking

[numbered_list_ranking category=”” posts_per_page=”8″ offset=”0″ unique_group=”ranking1″ title_color=”#111″ padding=”25″ custom_class=””]
function np_numbered_list_ranking_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'ranking1',
'title_color' => '#111', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-ranking-list {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-ranking-item {display:flex;gap:22px;align-items:flex-start;margin-bottom:28px;padding-bottom:28px;border-bottom:1px solid #eee;}
.np-ranking-item:last-child {border-bottom:none;margin-bottom:0;padding-bottom:0;}
.np-ranking-number {font-size:3.2rem;line-height:1;font-weight:900;color:#c8102e;min-width:60px;}
.np-ranking-content h3 {font-size:1.25rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin:0;}
.np-ranking-content img {width:100%;height:140px;object-fit:cover;border-radius:10px;margin-top:12px;}
</style>
<div class="np-ranking-list <?php echo esc_attr($atts['custom_class']); ?>">
<?php $count = 1; while($query->have_posts()) : $query->the_post(); ?>
<div class="np-ranking-item">
<div class="np-ranking-number"><?php echo $count++; ?></div>
<div class="np-ranking-content">
<h3><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<?php the_post_thumbnail('medium', array('style'=>'width:100%;height:auto;')); ?>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('numbered_list_ranking', 'np_numbered_list_ranking_shortcode'); 35. Map-Integrated Section (Placeholder)

[map_integrated_section category=”” posts_per_page=”4″ offset=”0″ unique_group=”map1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_map_integrated_section_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'map1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-map-section {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:grid;grid-template-columns:1fr 1fr;gap:30px;}
.np-map-placeholder {background:#111;color:#fff;height:420px;border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:1.4rem;text-align:center;}
.np-map-cards {display:flex;flex-direction:column;gap:20px;}
.np-map-card {background:#fff;padding:18px;border-radius:12px;box-shadow:0 6px 18px rgba(0,0,0,0.08);display:flex;gap:16px;}
.np-map-card img {width:110px;height:82px;object-fit:cover;border-radius:8px;}
@media (max-width:992px) {.np-map-section {grid-template-columns:1fr;}}
</style>
<div class="np-map-section <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-map-placeholder">Interactive Map<br><small>(Embed Google Maps or custom map here)</small></div>
<div class="np-map-cards">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-map-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
<h4 style="margin:0;color:<?php echo esc_attr($atts['title_color']); ?>;"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('map_integrated_section', 'np_map_integrated_section_shortcode'); 36. Quote Pull Block

[quote_pull_block category=”” posts_per_page=”3″ offset=”0″ unique_group=”quote1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_quote_pull_block_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 3, 'offset' => 0, 'unique_group' => 'quote1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-quote-block {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:#f8f8f8;}
.np-quote-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:28px;}
.np-quote-card {background:#fff;padding:32px;border-left:6px solid #c8102e;border-radius:8px;box-shadow:0 8px 25px rgba(0,0,0,0.07);}
.np-quote-text {font-size:1.35rem;line-height:1.55;font-style:italic;color:#222;margin:0 0 20px;}
.np-quote-author {font-weight:600;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-quote-block <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-quote-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-quote-card">
<p class="np-quote-text">"<?php echo wp_trim_words(get_the_excerpt(), 28); ?>"</p>
<div class="np-quote-author">— <?php the_title(); ?></div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('quote_pull_block', 'np_quote_pull_block_shortcode'); 37. Related Stories Horizontal

[related_stories_horizontal category=”” posts_per_page=”6″ offset=”0″ unique_group=”relatedh1″ title_color=”#111″ padding=”25″ custom_class=””]
function np_related_stories_horizontal_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'relatedh1',
'title_color' => '#111', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-related-horizontal {padding:<?php echo esc_attr($atts['padding']); ?>px 0;overflow:hidden;}
.np-related-scroll {display:flex;gap:20px;overflow-x:auto;padding-bottom:15px;}
.np-related-card {min-width:260px;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,0.08);transition:transform .3s;}
.np-related-card:hover {transform:translateY(-8px);}
.np-related-card img {width:100%;height:160px;object-fit:cover;}
.np-related-body {padding:16px;}
.np-related-title {font-size:1.1rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-related-horizontal <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-related-scroll">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-related-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-related-body">
<h4 class="np-related-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('related_stories_horizontal', 'np_related_stories_horizontal_shortcode'); 38. Podcast/Audio Card Grid

[podcast_audio_grid category=”” posts_per_page=”6″ offset=”0″ unique_group=”podcast1″ title_color=”#111″ border_radius=”14″ padding=”25″ custom_class=””]
function np_podcast_audio_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'podcast1',
'title_color' => '#111', 'border_radius' => '14', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-podcast-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-podcast-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.1);}
.np-podcast-card img {width:100%;height:180px;object-fit:cover;}
.np-podcast-body {padding:18px;}
.np-podcast-play {background:#c8102e;color:#fff;width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-bottom:12px;}
.np-podcast-title {font-size:1.15rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-podcast-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-podcast-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-podcast-body">
<div class="np-podcast-play">▶</div>
<h3 class="np-podcast-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('podcast_audio_grid', 'np_podcast_audio_grid_shortcode'); 39. Weather/Alert Special Block

[weather_alert_block category=”” posts_per_page=”1″ offset=”0″ unique_group=”alert1″ bg_color=”#c8102e” title_color=”#ffffff” padding=”35″ custom_class=””]
function np_weather_alert_block_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'alert1',
'bg_color' => '#c8102e', 'title_color' => '#ffffff', 'padding' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-alert-block {background:<?php echo esc_attr($atts['bg_color']); ?>;color:<?php echo esc_attr($atts['title_color']); ?>;padding:<?php echo esc_attr($atts['padding']); ?>px;border-radius:12px;text-align:center;}
.np-alert-title {font-size:1.8rem;font-weight:800;margin:0 0 12px;}
.np-alert-content {font-size:1.15rem;max-width:720px;margin:0 auto;}
</style>
<div class="np-alert-block <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-alert-title">⚠️ URGENT ALERT</div>
<div class="np-alert-content"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('weather_alert_block', 'np_weather_alert_block_shortcode'); 40. Author Spotlight Row

[author_spotlight_row category=”” posts_per_page=”4″ offset=”0″ unique_group=”author1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_author_spotlight_row_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'author1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-author-row {padding:<?php echo esc_attr($atts['padding']); ?>px 0;overflow-x:auto;}
.np-author-scroll {display:flex;gap:25px;}
.np-author-card {min-width:240px;text-align:center;background:#fff;padding:22px;border-radius:14px;box-shadow:0 8px 25px rgba(0,0,0,0.08);}
.np-author-card img {width:110px;height:110px;border-radius:50%;object-fit:cover;margin-bottom:14px;border:4px solid #c8102e;}
.np-author-name {font-size:1.25rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin:0 0 6px;}
</style>
<div class="np-author-row <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-author-scroll">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-author-card">
<?php echo get_avatar(get_the_author_meta('ID'), 110); ?>
<div class="np-author-name"><?php the_author(); ?></div>
<a href="<?php the_permalink(); ?>" style="color:#c8102e;font-weight:600;">Latest Article →</a>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('author_spotlight_row', 'np_author_spotlight_row_shortcode'); 41. Grid with Hover Zoom

[grid_hover_zoom category=”” posts_per_page=”6″ offset=”0″ unique_group=”zoomgrid1″ title_color=”#111″ show_title=”yes” show_excerpt=”yes” excerpt_length=”15″ border_radius=”12″ padding=”25″ custom_class=””]
function np_grid_hover_zoom_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'zoomgrid1',
'title_color' => '#111', 'show_title' => 'yes', 'show_excerpt' => 'yes', 'excerpt_length' => 15,
'border_radius' => '12', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-zoom-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-zoom-card {position:relative;overflow:hidden;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;box-shadow:0 6px 20px rgba(0,0,0,0.1);transition:all .4s;}
.np-zoom-card:hover {box-shadow:0 20px 40px rgba(200,16,46,0.25);transform:scale(1.04);}
.np-zoom-card img {width:100%;height:240px;object-fit:cover;transition:transform .6s;}
.np-zoom-card:hover img {transform:scale(1.12);}
.np-zoom-body {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000000dd);padding:25px;color:#fff;}
.np-zoom-title {font-size:1.25rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-zoom-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-zoom-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-zoom-body">
<?php if ($atts['show_title'] === 'yes') : ?><h3 class="np-zoom-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3><?php endif; ?>
<?php if ($atts['show_excerpt'] === 'yes') : ?><p style="margin:8px 0 0;font-size:0.95rem;"><?php echo wp_trim_words(get_the_excerpt(), intval($atts['excerpt_length'])); ?></p><?php endif; ?>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('grid_hover_zoom', 'np_grid_hover_zoom_shortcode'); 42. Full-Width Breaking Bar

[full_width_breaking_bar category=”” posts_per_page=”8″ offset=”0″ unique_group=”breakingbar1″ bg_color=”#c8102e” title_color=”#ffffff” ticker_speed=”30″ padding=”14″ custom_class=””]
function np_full_width_breaking_bar_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'breakingbar1',
'bg_color' => '#c8102e', 'title_color' => '#ffffff', 'ticker_speed' => '30', 'padding' => '14', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-breaking-bar {background:<?php echo esc_attr($atts['bg_color']); ?>;color:<?php echo esc_attr($atts['title_color']); ?>;padding:<?php echo esc_attr($atts['padding']); ?>px 0;overflow:hidden;white-space:nowrap;position:relative;}
.np-breaking-label {background:#000;color:#fff;padding:8px 24px;font-weight:700;display:inline-block;margin-right:20px;}
.np-breaking-content {display:inline-block;animation:np-breaking-slide <?php echo intval($atts['ticker_speed']); ?>s linear infinite;}
.np-breaking-item {display:inline-block;margin-right:50px;font-size:1.1rem;}
@keyframes np-breaking-slide {0%{transform:translateX(0);} 100%{transform:translateX(-50%);}}
</style>
<div class="np-breaking-bar <?php echo esc_attr($atts['custom_class']); ?>">
<span class="np-breaking-label">BREAKING NEWS</span>
<div class="np-breaking-content">
<?php while($query->have_posts()) : $query->the_post(); ?>
<span class="np-breaking-item">• <a href="<?php the_permalink(); ?>" style="color:inherit;text-decoration:none;"><?php the_title(); ?></a></span>
<?php endwhile; ?>
<?php while($query->have_posts()) : $query->the_post(); ?> <!-- duplicate for seamless loop -->
<span class="np-breaking-item">• <a href="<?php the_permalink(); ?>" style="color:inherit;text-decoration:none;"><?php the_title(); ?></a></span>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('full_width_breaking_bar', 'np_full_width_breaking_bar_shortcode'); 43. Card Flip Effect

[card_flip_effect category=”” posts_per_page=”6″ offset=”0″ unique_group=”flip1″ title_color=”#111″ border_radius=”16″ padding=”25″ custom_class=””]
function np_card_flip_effect_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'flip1',
'title_color' => '#111', 'border_radius' => '16', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-flip-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-flip-card {perspective:1000px;height:340px;}
.np-flip-inner {position:relative;width:100%;height:100%;transition:transform 0.7s;transform-style:preserve-3d;}
.np-flip-card:hover .np-flip-inner {transform:rotateY(180deg);}
.np-flip-front, .np-flip-back {position:absolute;width:100%;height:100%;backface-visibility:hidden;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.12);}
.np-flip-front {background:#fff;}
.np-flip-front img {width:100%;height:100%;object-fit:cover;}
.np-flip-back {background:#111;color:#fff;transform:rotateY(180deg);display:flex;align-items:center;justify-content:center;padding:25px;text-align:center;}
.np-flip-title {font-size:1.25rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-flip-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-flip-card">
<div class="np-flip-inner">
<div class="np-flip-front">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
</div>
<div class="np-flip-back">
<div>
<h3 class="np-flip-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<p style="margin-top:12px;font-size:0.95rem;"><?php echo wp_trim_words(get_the_excerpt(), 20); ?></p>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('card_flip_effect', 'np_card_flip_effect_shortcode'); 44. Newspaper Column Mimic

[newspaper_column_mimic category=”” posts_per_page=”6″ offset=”0″ unique_group=”newspaper1″ title_color=”#111″ padding=”35″ custom_class=””]
function np_newspaper_column_mimic_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'newspaper1',
'title_color' => '#111', 'padding' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-newspaper {padding:<?php echo esc_attr($atts['padding']); ?>px 0;column-count:3;column-gap:40px;}
.np-newspaper-item {break-inside:avoid;margin-bottom:35px;}
.np-newspaper-title {font-size:1.35rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin:0 0 12px;}
.np-newspaper-excerpt {font-size:0.98rem;line-height:1.65;color:#444;}
@media (max-width:992px) {.np-newspaper {column-count:2;}}
@media (max-width:640px) {.np-newspaper {column-count:1;}}
</style>
<div class="np-newspaper <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-newspaper-item">
<h3 class="np-newspaper-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<p class="np-newspaper-excerpt"><?php echo wp_trim_words(get_the_excerpt(), 35); ?></p>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('newspaper_column_mimic', 'np_newspaper_column_mimic_shortcode'); 45. Interactive Poll Block

[interactive_poll_block category=”” posts_per_page=”1″ offset=”0″ unique_group=”poll1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_interactive_poll_block_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'poll1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-poll-block {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:#f9f9f9;border-radius:12px;}
.np-poll-title {font-size:1.5rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin-bottom:20px;}
.np-poll-option {background:#fff;margin:12px 0;padding:16px;border-radius:8px;cursor:pointer;transition:all .3s;}
.np-poll-option:hover {background:#fee;}
</style>
<div class="np-poll-block <?php echo esc_attr($atts['custom_class']); ?>">
<h3 class="np-poll-title">Poll: <?php echo esc_html(get_the_title($post)); ?></h3>
<div class="np-poll-option">Option 1</div>
<div class="np-poll-option">Option 2</div>
<div class="np-poll-option">Option 3</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('interactive_poll_block', 'np_interactive_poll_block_shortcode'); 46. Photo Essay Full-Bleed

[photo_essay_full_bleed category=”” posts_per_page=”4″ offset=”0″ unique_group=”essay1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_photo_essay_full_bleed_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'essay1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-photo-essay {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-essay-slide {height:78vh;position:relative;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;color:#fff;}
.np-essay-slide::before {content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(0,0,0,0.75));}
.np-essay-content {position:relative;z-index:2;text-align:center;max-width:800px;}
.np-essay-title {font-size:clamp(2rem,5.5vw,4rem);font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-photo-essay <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-essay-slide" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url(null,'full')); ?>');">
<div class="np-essay-content">
<h2 class="np-essay-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h2>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('photo_essay_full_bleed', 'np_photo_essay_full_bleed_shortcode'); 47. Compact Mobile-First Stack

[compact_mobile_first category=”” posts_per_page=”8″ offset=”0″ unique_group=”mobile1″ title_color=”#111″ padding=”15″ custom_class=””]
function np_compact_mobile_first_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'mobile1',
'title_color' => '#111', 'padding' => '15', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-mobile-stack {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-mobile-item {display:flex;gap:16px;margin-bottom:22px;padding-bottom:22px;border-bottom:1px solid #eee;}
.np-mobile-item:last-child {border-bottom:none;margin-bottom:0;padding-bottom:0;}
.np-mobile-img img {width:96px;height:72px;object-fit:cover;border-radius:8px;}
.np-mobile-title {font-size:1.1rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-mobile-stack <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-mobile-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
<h3 class="np-mobile-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('compact_mobile_first', 'np_compact_mobile_first_shortcode'); 48. Dual Hero Side-by-Side

[dual_hero_side_by_side category=”” posts_per_page=”2″ offset=”0″ unique_group=”dualhero1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_dual_hero_side_by_side_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 2, 'offset' => 0, 'unique_group' => 'dualhero1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>2,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if ($query->post_count < 2) return '';
$posts = $query->posts;
ob_start(); ?>
<style>
.np-dual-hero {display:grid;grid-template-columns:1fr 1fr;gap:0;height:620px;}
.np-dual-left, .np-dual-right {position:relative;background-size:cover;background-position:center;display:flex;align-items:flex-end;padding:50px 40px;color:#fff;}
.np-dual-left::before, .np-dual-right::before {content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(0,0,0,0.75));}
.np-dual-content {position:relative;z-index:2;}
.np-dual-title {font-size:2.2rem;line-height:1.25;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-dual-hero {grid-template-columns:1fr;height:auto;}}
</style>
<div class="np-dual-hero <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-dual-left" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($posts[0]->ID,'large')); ?>');">
<div class="np-dual-content"><h2 class="np-dual-title"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h2></div>
</div>
<div class="np-dual-right" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($posts[1]->ID,'large')); ?>');">
<div class="np-dual-content"><h2 class="np-dual-title"><a href="<?php echo esc_url(get_permalink($posts[1])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[1])); ?></a></h2></div>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('dual_hero_side_by_side', 'np_dual_hero_side_by_side_shortcode'); 49. Gradient Background Cards

[gradient_background_cards category=”” posts_per_page=”6″ offset=”0″ unique_group=”gradient1″ title_color=”#ffffff” border_radius=”16″ padding=”25″ custom_class=””]
function np_gradient_background_cards_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'gradient1',
'title_color' => '#ffffff', 'border_radius' => '16', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-gradient-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:24px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-gradient-card {position:relative;height:360px;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,0.15);}
.np-gradient-card::before {content:"";position:absolute;inset:0;background:linear-gradient(135deg, #c8102e, #ff4d4d);}
.np-gradient-card img {width:100%;height:100%;object-fit:cover;mix-blend-mode:overlay;opacity:0.85;}
.np-gradient-content {position:absolute;bottom:0;left:0;right:0;padding:30px;color:#fff;}
.np-gradient-title {font-size:1.35rem;line-height:1.3;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-gradient-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-gradient-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-gradient-content">
<h3 class="np-gradient-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('gradient_background_cards', 'np_gradient_background_cards_shortcode'); 50. Sticky Sidebar Related

[sticky_sidebar_related category=”” posts_per_page=”5″ offset=”0″ unique_group=”stickysidebar1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_sticky_sidebar_related_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'stickysidebar1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-sticky-sidebar {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:grid;grid-template-columns:1fr 340px;gap:40px;}
.np-main-area {min-height:800px;}
.np-sticky-box {position:sticky;top:30px;background:#fff;padding:28px;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,0.1);}
.np-sticky-title {font-size:1.2rem;color:#c8102e;font-weight:700;margin-bottom:20px;}
@media (max-width:992px) {.np-sticky-sidebar {grid-template-columns:1fr;}}
</style>
<div class="np-sticky-sidebar <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-main-area">Main Content Area (Add your main post content here)</div>
<div class="np-sticky-box">
<div class="np-sticky-title">RELATED STORIES</div>
<?php while($query->have_posts()) : $query->the_post(); ?>
<div style="margin-bottom:22px;">
<a href="<?php the_permalink(); ?>" style="color:<?php echo esc_attr($atts['title_color']); ?>;font-weight:600;"><?php the_title(); ?></a>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('sticky_sidebar_related', 'np_sticky_sidebar_related_shortcode'); 51. Animated Hover Lift

[animated_hover_lift category=”” posts_per_page=”6″ offset=”0″ unique_group=”lift1″ title_color=”#111″ show_title=”yes” show_excerpt=”yes” excerpt_length=”16″ border_radius=”16″ padding=”28″ custom_class=””]
function np_animated_hover_lift_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'lift1',
'title_color' => '#111', 'show_title' => 'yes', 'show_excerpt' => 'yes', 'excerpt_length' => 16,
'border_radius' => '16', 'padding' => '28', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-lift-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:28px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-lift-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.1);transition:all .4s cubic-bezier(0.4,0,0.2,1);}
.np-lift-card:hover {transform:translateY(-18px) scale(1.03);box-shadow:0 25px 50px rgba(200,16,46,0.3);}
.np-lift-card img {width:100%;height:220px;object-fit:cover;transition:transform .5s;}
.np-lift-card:hover img {transform:scale(1.1);}
.np-lift-body {padding:22px;}
.np-lift-title {font-size:1.22rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-lift-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-lift-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-lift-body">
<?php if ($atts['show_title'] === 'yes') : ?><h3 class="np-lift-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3><?php endif; ?>
<?php if ($atts['show_excerpt'] === 'yes') : ?><p style="margin-top:10px;color:#555;"><?php echo wp_trim_words(get_the_excerpt(), intval($atts['excerpt_length'])); ?></p><?php endif; ?>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('animated_hover_lift', 'np_animated_hover_lift_shortcode'); 52. Thin Border Magazine

[thin_border_magazine category=”” posts_per_page=”5″ offset=”0″ unique_group=”thinmag1″ title_color=”#111″ border_radius=”4″ padding=”30″ custom_class=””]
function np_thin_border_magazine_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'thinmag1',
'title_color' => '#111', 'border_radius' => '4', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-thin-mag {display:grid;grid-template-columns:2fr 1fr;gap:40px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-thin-featured {border:1px solid #ddd;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;}
.np-thin-featured img {width:100%;height:520px;object-fit:cover;}
.np-thin-side {display:flex;flex-direction:column;gap:28px;}
.np-thin-side-item {display:flex;gap:20px;border-bottom:1px solid #eee;padding-bottom:24px;}
.np-thin-side-item:last-child {border-bottom:none;padding-bottom:0;}
.np-thin-side-img img {width:130px;height:92px;object-fit:cover;border-radius:6px;}
.np-thin-title {font-size:1.35rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-thin-mag {grid-template-columns:1fr;}}
</style>
<div class="np-thin-mag <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-thin-featured">
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a>
<div style="padding:22px;"><h2 class="np-thin-title"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h2></div>
</div>
<div class="np-thin-side">
<?php for($i=1; $i<$query->post_count; $i++) : ?>
<div class="np-thin-side-item">
<div class="np-thin-side-img"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'thumbnail'); ?></a></div>
<h3 class="np-thin-title"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h3>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('thin_border_magazine', 'np_thin_border_magazine_shortcode'); 53. Full-Screen Interstitial

[full_screen_interstitial category=”” posts_per_page=”1″ offset=”0″ unique_group=”interstitial1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_full_screen_interstitial_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'interstitial1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-interstitial {height:100vh;position:relative;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;color:#fff;overflow:hidden;}
.np-interstitial::before {content:"";position:absolute;inset:0;background:linear-gradient(45deg,rgba(200,16,46,0.75),rgba(0,0,0,0.6));}
.np-interstitial-content {position:relative;z-index:2;text-align:center;max-width:880px;padding:0 20px;}
.np-interstitial-title {font-size:clamp(3rem,8vw,6rem);line-height:1.05;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-interstitial <?php echo esc_attr($atts['custom_class']); ?>" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($post->ID,'full')); ?>');">
<div class="np-interstitial-content">
<h1 class="np-interstitial-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h1>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('full_screen_interstitial', 'np_full_screen_interstitial_shortcode'); 54. Related Stories Footer

[related_stories_footer category=”” posts_per_page=”4″ offset=”0″ unique_group=”footerrelated1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_related_stories_footer_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'footerrelated1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-related-footer {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:#f8f8f8;}
.np-related-footer-grid {display:flex;gap:22px;overflow-x:auto;padding-bottom:10px;}
.np-related-footer-card {min-width:260px;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,0.08);}
.np-related-footer-card img {width:100%;height:160px;object-fit:cover;}
.np-related-footer-body {padding:16px;}
.np-related-footer-title {font-size:1.1rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-related-footer <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-related-footer-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-related-footer-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-related-footer-body">
<h4 class="np-related-footer-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('related_stories_footer', 'np_related_stories_footer_shortcode'); 55. Author Bio Card Row

[author_bio_card_row category=”” posts_per_page=”4″ offset=”0″ unique_group=”authorbio1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_author_bio_card_row_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'authorbio1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-author-bio-row {padding:<?php echo esc_attr($atts['padding']); ?>px 0;overflow-x:auto;}
.np-author-bio-scroll {display:flex;gap:24px;}
.np-author-bio-card {min-width:260px;background:#fff;padding:24px;border-radius:14px;box-shadow:0 8px 25px rgba(0,0,0,0.1);text-align:center;}
.np-author-bio-card img {width:96px;height:96px;border-radius:50%;object-fit:cover;border:4px solid #c8102e;margin-bottom:16px;}
.np-author-bio-name {font-size:1.25rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-author-bio-row <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-author-bio-scroll">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-author-bio-card">
<?php echo get_avatar(get_the_author_meta('ID'), 96); ?>
<div class="np-author-bio-name"><?php the_author(); ?></div>
<a href="<?php the_permalink(); ?>" style="color:#c8102e;margin-top:12px;display:inline-block;">Read Latest →</a>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('author_bio_card_row', 'np_author_bio_card_row_shortcode'); 56. Breaking Alert Modal

[breaking_alert_modal category=”” posts_per_page=”1″ offset=”0″ unique_group=”modal1″ title_color=”#ffffff” bg_color=”#c8102e” custom_class=””]
function np_breaking_alert_modal_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'modal1',
'title_color' => '#ffffff', 'bg_color' => '#c8102e', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-breaking-modal {position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:<?php echo esc_attr($atts['bg_color']); ?>;color:<?php echo esc_attr($atts['title_color']); ?>;padding:40px 50px;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,0.4);z-index:9999;max-width:520px;text-align:center;display:none;}
.np-breaking-modal.show {display:block;animation:np-modal-pop .4s;}
@keyframes np-modal-pop {0%{transform:translate(-50%,-60%) scale(0.8);opacity:0;} 100%{transform:translate(-50%,-50%) scale(1);opacity:1;}}
</style>
<div class="np-breaking-modal <?php echo esc_attr($atts['custom_class']); ?>" id="np_modal_<?php echo esc_attr($atts['unique_group']); ?>">
<h2 style="margin:0 0 16px;">🚨 BREAKING</h2>
<h3 style="margin:0 0 20px;"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h3>
<button onclick="document.getElementById('np_modal_<?php echo esc_attr($atts['unique_group']); ?>').style.display='none';" style="background:#fff;color:#c8102e;padding:10px 28px;border:none;border-radius:6px;font-weight:600;cursor:pointer;">Close</button>
</div>
<script>
setTimeout(() => { document.getElementById('np_modal_<?php echo esc_attr($atts['unique_group']); ?>').classList.add('show'); }, 1800);
</script>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('breaking_alert_modal', 'np_breaking_alert_modal_shortcode'); 57. Grid with Category Badges

[grid_category_badges category=”” posts_per_page=”6″ offset=”0″ unique_group=”badges1″ title_color=”#111″ border_radius=”12″ padding=”25″ custom_class=””]
function np_grid_category_badges_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'badges1',
'title_color' => '#111', 'border_radius' => '12', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-badges-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-badges-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 6px 20px rgba(0,0,0,0.09);position:relative;}
.np-badges-card img {width:100%;height:210px;object-fit:cover;}
.np-badges-category {position:absolute;top:14px;left:14px;background:#c8102e;color:#fff;padding:4px 14px;font-size:13px;border-radius:4px;}
.np-badges-body {padding:18px;}
.np-badges-title {font-size:1.2rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-badges-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post();
$cat = get_the_category(); ?>
<div class="np-badges-card">
<?php if ($cat) : ?><div class="np-badges-category"><?php echo esc_html($cat[0]->name); ?></div><?php endif; ?>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-badges-body">
<h3 class="np-badges-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('grid_category_badges', 'np_grid_category_badges_shortcode'); 58. Vertical Accordion List

[vertical_accordion_list category=”” posts_per_page=”6″ offset=”0″ unique_group=”accordion1″ title_color=”#111″ padding=”20″ custom_class=””]
function np_vertical_accordion_list_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'accordion1',
'title_color' => '#111', 'padding' => '20', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-accordion {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-accordion-item {border-bottom:1px solid #eee;}
.np-accordion-header {padding:18px 0;cursor:pointer;display:flex;justify-content:space-between;align-items:center;font-weight:600;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-accordion-content {max-height:0;overflow:hidden;transition:max-height .4s ease;padding:0 0 18px;}
.np-accordion-content.show {max-height:300px;}
</style>
<div class="np-accordion <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-accordion-item">
<div class="np-accordion-header" onclick="this.nextElementSibling.classList.toggle('show')">
<?php the_title(); ?> <span style="font-size:1.4rem;">›</span>
</div>
<div class="np-accordion-content">
<p><?php echo wp_trim_words(get_the_excerpt(), 40); ?></p>
<a href="<?php the_permalink(); ?>" style="color:#c8102e;">Read full story →</a>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('vertical_accordion_list', 'np_vertical_accordion_list_shortcode'); 59. Photo Story Sequence

[photo_story_sequence category=”” posts_per_page=”5″ offset=”0″ unique_group=”sequence1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_photo_story_sequence_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'sequence1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-photo-sequence {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-sequence-item {height:520px;position:relative;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;color:#fff;}
.np-sequence-item::before {content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(0,0,0,0.7));}
.np-sequence-number {position:absolute;top:30px;left:40px;font-size:4rem;font-weight:900;opacity:0.25;}
.np-sequence-content {position:relative;z-index:2;text-align:center;}
.np-sequence-title {font-size:2.1rem;line-height:1.25;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-photo-sequence <?php echo esc_attr($atts['custom_class']); ?>">
<?php foreach($posts as $index => $post) : setup_postdata($post); ?>
<div class="np-sequence-item" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($post->ID,'full')); ?>');">
<div class="np-sequence-number"><?php echo $index+1; ?></div>
<div class="np-sequence-content">
<h2 class="np-sequence-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h2>
</div>
</div>
<?php endforeach; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('photo_story_sequence', 'np_photo_story_sequence_shortcode'); 60. Dark Theme Minimal

[dark_theme_minimal category=”” posts_per_page=”6″ offset=”0″ unique_group=”darkminimal1″ title_color=”#ffffff” padding=”30″ custom_class=””]
function np_dark_theme_minimal_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'darkminimal1',
'title_color' => '#ffffff', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-dark-minimal {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:#0f0f0f;color:#ddd;}
.np-dark-minimal-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:26px;}
.np-dark-minimal-card {background:#1a1a1a;border-radius:12px;overflow:hidden;}
.np-dark-minimal-card img {width:100%;height:210px;object-fit:cover;}
.np-dark-minimal-body {padding:20px;}
.np-dark-minimal-title {font-size:1.25rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-dark-minimal <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-dark-minimal-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-dark-minimal-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-dark-minimal-body">
<h3 class="np-dark-minimal-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('dark_theme_minimal', 'np_dark_theme_minimal_shortcode'); 61. Interactive Timeline

[interactive_timeline category=”” posts_per_page=”6″ offset=”0″ unique_group=”timeline_int1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_interactive_timeline_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'timeline_int1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-int-timeline {padding:<?php echo esc_attr($atts['padding']); ?>px 0;position:relative;}
.np-int-timeline::before {content:"";position:absolute;left:50px;top:0;bottom:0;width:3px;background:#c8102e;opacity:0.25;}
.np-int-timeline-item {display:flex;gap:40px;margin-bottom:50px;position:relative;}
.np-int-timeline-dot {width:28px;height:28px;background:#c8102e;border:4px solid #fff;border-radius:50%;flex-shrink:0;position:relative;z-index:2;}
.np-int-timeline-content {flex:1;background:#fff;padding:24px;border-radius:12px;box-shadow:0 6px 20px rgba(0,0,0,0.08);}
.np-int-timeline-date {color:#c8102e;font-weight:600;font-size:0.95rem;}
.np-int-timeline-title {font-size:1.35rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin:8px 0 12px;}
</style>
<div class="np-int-timeline <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-int-timeline-item">
<div class="np-int-timeline-dot"></div>
<div class="np-int-timeline-content">
<div class="np-int-timeline-date"><?php echo get_the_date('d F Y'); ?></div>
<h3 class="np-int-timeline-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<p><?php echo wp_trim_words(get_the_excerpt(), 28); ?></p>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('interactive_timeline', 'np_interactive_timeline_shortcode'); 62. Card Mosaic Pattern

[card_mosaic_pattern category=”” posts_per_page=”8″ offset=”0″ unique_group=”mosaic1″ title_color=”#111″ border_radius=”12″ padding=”30″ custom_class=””]
function np_card_mosaic_pattern_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'mosaic1',
'title_color' => '#111', 'border_radius' => '12', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-mosaic {display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-mosaic-item {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,0.1);transition:all .3s;}
.np-mosaic-item:hover {transform:scale(1.05);}
.np-mosaic-item img {width:100%;height:190px;object-fit:cover;}
.np-mosaic-body {padding:16px;}
.np-mosaic-title {font-size:1.1rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-mosaic-item:nth-child(3n+1) {grid-row:span 2;}
</style>
<div class="np-mosaic <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-mosaic-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-mosaic-body">
<h3 class="np-mosaic-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('card_mosaic_pattern', 'np_card_mosaic_pattern_shortcode'); 63. Sidebar Trending Box

[sidebar_trending_box category=”” posts_per_page=”5″ offset=”0″ unique_group=”trendingbox1″ title_color=”#111″ padding=”25″ custom_class=””]
function np_sidebar_trending_box_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'trendingbox1',
'title_color' => '#111', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-trending-box {padding:<?php echo esc_attr($atts['padding']); ?>px;max-width:340px;background:#fff;border:1px solid #eee;border-radius:12px;box-shadow:0 8px 25px rgba(0,0,0,0.08);}
.np-trending-header {font-size:1.3rem;font-weight:700;color:#c8102e;margin-bottom:20px;}
.np-trending-item {display:flex;gap:14px;margin-bottom:20px;}
.np-trending-item:last-child {margin-bottom:0;}
.np-trending-img img {width:78px;height:62px;object-fit:cover;border-radius:6px;}
.np-trending-title {font-size:1.05rem;line-height:1.35;font-weight:600;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-trending-box <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-trending-header">🔥 TRENDING</div>
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-trending-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
<h4 class="np-trending-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('sidebar_trending_box', 'np_sidebar_trending_box_shortcode'); 64. Hero with Multiple CTAs

[hero_with_multiple_ctas category=”” posts_per_page=”1″ offset=”0″ unique_group=”herocta1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_hero_multiple_ctas_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'herocta1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-hero-cta {height:78vh;position:relative;background-size:cover;background-position:center;display:flex;align-items:center;color:#fff;}
.np-hero-cta::before {content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,0.3),rgba(200,16,46,0.65));}
.np-hero-cta-content {position:relative;z-index:2;max-width:820px;margin:0 auto;padding:0 20px;text-align:center;}
.np-hero-cta-title {font-size:clamp(2.6rem,6vw,4.8rem);line-height:1.15;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-cta-buttons {margin-top:30px;display:flex;gap:16px;justify-content:center;flex-wrap:wrap;}
.np-cta-btn {background:#fff;color:#c8102e;padding:14px 32px;border-radius:6px;font-weight:700;text-decoration:none;transition:all .3s;}
.np-cta-btn:hover {background:#c8102e;color:#fff;transform:translateY(-4px);}
</style>
<div class="np-hero-cta <?php echo esc_attr($atts['custom_class']); ?>" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($post->ID,'full')); ?>');">
<div class="np-hero-cta-content">
<h1 class="np-hero-cta-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h1>
<div class="np-cta-buttons">
<a href="<?php echo esc_url(get_permalink($post)); ?>" class="np-cta-btn">Read Full Story</a>
<a href="#" class="np-cta-btn">Watch Video</a>
</div>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('hero_with_multiple_ctas', 'np_hero_multiple_ctas_shortcode'); 65. Print-Style Justified Text

[print_style_justified_text category=”” posts_per_page=”4″ offset=”0″ unique_group=”printjust1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_print_style_justified_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'printjust1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-print-justified {padding:<?php echo esc_attr($atts['padding']); ?>px 0;column-count:2;column-gap:50px;max-width:1100px;margin:0 auto;}
.np-print-item {break-inside:avoid;margin-bottom:50px;}
.np-print-title {font-size:1.45rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin-bottom:12px;}
.np-print-excerpt {text-align:justify;line-height:1.75;color:#333;}
@media (max-width:992px) {.np-print-justified {column-count:1;}}
</style>
<div class="np-print-justified <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-print-item">
<h2 class="np-print-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h2>
<p class="np-print-excerpt"><?php echo wp_trim_words(get_the_excerpt(), 65); ?></p>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('print_style_justified_text', 'np_print_style_justified_shortcode'); 66. Hover Reveal Caption

[hover_reveal_caption category=”” posts_per_page=”6″ offset=”0″ unique_group=”hovercap1″ title_color=”#ffffff” border_radius=”12″ padding=”25″ custom_class=””]
function np_hover_reveal_caption_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'hovercap1',
'title_color' => '#ffffff', 'border_radius' => '12', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-hover-reveal {display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:22px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-hover-reveal-card {position:relative;height:320px;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;}
.np-hover-reveal-card img {width:100%;height:100%;object-fit:cover;transition:transform .5s;}
.np-hover-reveal-card:hover img {transform:scale(1.1);}
.np-hover-caption {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000);padding:30px 22px;transform:translateY(60%);transition:transform .4s;}
.np-hover-reveal-card:hover .np-hover-caption {transform:translateY(0);}
.np-hover-title {font-size:1.3rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-hover-reveal <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-hover-reveal-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-hover-caption">
<h3 class="np-hover-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('hover_reveal_caption', 'np_hover_reveal_caption_shortcode'); 67. Section Divider Lines

[section_divider_lines category=”” posts_per_page=”4″ offset=”0″ unique_group=”dividerlines1″ title_color=”#111″ padding=”50″ custom_class=””]
function np_section_divider_lines_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'dividerlines1',
'title_color' => '#111', 'padding' => '50', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-divider-lines {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-divider-item {padding-bottom:60px;margin-bottom:60px;border-bottom:1px solid #ddd;position:relative;}
.np-divider-item:last-child {border-bottom:none;margin-bottom:0;padding-bottom:0;}
.np-divider-title {font-size:1.8rem;line-height:1.3;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-divider-lines <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-divider-item">
<h2 class="np-divider-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h2>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('section_divider_lines', 'np_section_divider_lines_shortcode'); 68. Big Number Headline

[big_number_headline category=”” posts_per_page=”5″ offset=”0″ unique_group=”bignumber1″ title_color=”#c8102e” padding=”30″ custom_class=””]
function np_big_number_headline_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'bignumber1',
'title_color' => '#c8102e', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-big-number {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-big-number-item {display:flex;gap:30px;align-items:flex-start;margin-bottom:45px;}
.np-big-number-num {font-size:6.5rem;line-height:1;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;opacity:0.85;min-width:110px;}
.np-big-number-content h3 {font-size:1.45rem;line-height:1.35;font-weight:700;margin:0 0 12px;}
</style>
<div class="np-big-number <?php echo esc_attr($atts['custom_class']); ?>">
<?php $i = 1; while($query->have_posts()) : $query->the_post(); ?>
<div class="np-big-number-item">
<div class="np-big-number-num">0<?php echo $i++; ?></div>
<div class="np-big-number-content">
<h3><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<p style="color:#666;"><?php echo wp_trim_words(get_the_excerpt(), 22); ?></p>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('big_number_headline', 'np_big_number_headline_shortcode'); 69. Collage Overlap Grid

[collage_overlap_grid category=”” posts_per_page=”6″ offset=”0″ unique_group=”collagegrid1″ title_color=”#ffffff” padding=”40″ custom_class=””]
function np_collage_overlap_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'collagegrid1',
'title_color' => '#ffffff', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-collage-overlap {padding:<?php echo esc_attr($atts['padding']); ?>px 0;position:relative;}
.np-collage-overlap-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px;}
.np-collage-overlap-item {position:relative;border:6px solid #fff;border-radius:12px;overflow:hidden;box-shadow:0 12px 35px rgba(0,0,0,0.2);transition:transform .4s;}
.np-collage-overlap-item:hover {transform:scale(1.06);z-index:5;}
.np-collage-overlap-item img {width:100%;height:280px;object-fit:cover;}
.np-collage-overlap-content {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000);padding:22px;color:#fff;}
</style>
<div class="np-collage-overlap <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-collage-overlap-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-collage-overlap-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-collage-overlap-content">
<h4 style="margin:0;color:<?php echo esc_attr($atts['title_color']); ?>;"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('collage_overlap_grid', 'np_collage_overlap_grid_shortcode'); 70. Live Video Embed Grid

[live_video_embed_grid category=”” posts_per_page=”4″ offset=”0″ unique_group=”livevideo1″ title_color=”#111″ border_radius=”12″ padding=”25″ custom_class=””]
function np_live_video_embed_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'livevideo1',
'title_color' => '#111', 'border_radius' => '12', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-live-video-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-live-video-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,0.12);}
.np-live-video-card img {width:100%;height:200px;object-fit:cover;}
.np-live-video-play {position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(200,16,46,0.95);width:64px;height:64px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:28px;}
.np-live-video-body {padding:18px;}
.np-live-video-title {font-size:1.2rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-live-video-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-live-video-card" style="position:relative;">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-live-video-play">▶</div>
<div class="np-live-video-body">
<h3 class="np-live-video-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('live_video_embed_grid', 'np_live_video_embed_grid_shortcode'); 71. Minimal Single Column

[minimal_single_column category=”” posts_per_page=”5″ offset=”0″ unique_group=”singlecol1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_minimal_single_column_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'singlecol1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-single-col {max-width:780px;margin:0 auto;padding:<?php echo esc_attr($atts['padding']); ?>px 20px;}
.np-single-col-item {padding-bottom:50px;margin-bottom:50px;border-bottom:1px solid #eee;}
.np-single-col-item:last-child {border-bottom:none;margin-bottom:0;padding-bottom:0;}
.np-single-col-title {font-size:1.65rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin-bottom:14px;}
.np-single-col-excerpt {color:#555;line-height:1.75;}
</style>
<div class="np-single-col <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-single-col-item">
<?php if (has_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large', array('style' => 'width:100%;height:auto;border-radius:8px;margin-bottom:22px;')); ?></a>
<?php endif; ?>
<h2 class="np-single-col-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h2>
<p class="np-single-col-excerpt"><?php echo wp_trim_words(get_the_excerpt(), 55); ?></p>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('minimal_single_column', 'np_minimal_single_column_shortcode'); 72. Category Color-Coded

[category_color_coded category=”” posts_per_page=”6″ offset=”0″ unique_group=”colorcode1″ title_color=”#111″ border_radius=”10″ padding=”30″ custom_class=””]
function np_category_color_coded_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'colorcode1',
'title_color' => '#111', 'border_radius' => '10', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-color-coded {display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-color-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 8px 24px rgba(0,0,0,0.1);position:relative;}
.np-color-card img {width:100%;height:205px;object-fit:cover;}
.np-color-badge {position:absolute;top:16px;right:16px;padding:6px 16px;font-size:13px;font-weight:600;border-radius:20px;color:#fff;}
.np-color-body {padding:20px;}
.np-color-title {font-size:1.25rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-color-coded <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post();
$cats = get_the_category(); $color = !empty($cats) ? '#c8102e' : '#555'; ?>
<div class="np-color-card">
<?php if ($cats) : ?><div class="np-color-badge" style="background:<?php echo esc_attr($color); ?>;"><?php echo esc_html($cats[0]->name); ?></div><?php endif; ?>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-color-body">
<h3 class="np-color-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('category_color_coded', 'np_category_color_coded_shortcode'); 73. Infinite Masonry Load

[infinite_masonry_load category=”” posts_per_page=”9″ offset=”0″ unique_group=”infinitemasonry1″ title_color=”#111″ border_radius=”12″ padding=”30″ custom_class=””]
function np_infinite_masonry_load_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 9, 'offset' => 0, 'unique_group' => 'infinitemasonry1',
'title_color' => '#111', 'border_radius' => '12', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-infinite-masonry {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-masonry-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:24px;}
.np-masonry-item {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.1);break-inside:avoid;}
.np-masonry-item img {width:100%;height:auto;object-fit:cover;}
.np-masonry-body {padding:18px;}
.np-masonry-title {font-size:1.18rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-infinite-masonry <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-masonry-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-masonry-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-masonry-body">
<h3 class="np-masonry-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<!-- Simple "Load More" placeholder - can be extended with AJAX -->
<div style="text-align:center;margin-top:40px;"><button style="background:#c8102e;color:#fff;padding:12px 36px;border:none;border-radius:6px;cursor:pointer;">Load More Stories</button></div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('infinite_masonry_load', 'np_infinite_masonry_load_shortcode'); 74. Quote Wall Layout

[quote_wall_layout category=”” posts_per_page=”6″ offset=”0″ unique_group=”quotewall1″ title_color=”#c8102e” padding=”40″ custom_class=””]
function np_quote_wall_layout_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'quotewall1',
'title_color' => '#c8102e', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-quote-wall {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:28px;}
.np-quote-card {background:#f9f9f9;padding:32px;border-left:6px solid #c8102e;border-radius:8px;}
.np-quote-text {font-size:1.35rem;line-height:1.55;font-style:italic;color:#222;margin-bottom:20px;}
.np-quote-source {color:<?php echo esc_attr($atts['title_color']); ?>;font-weight:600;}
</style>
<div class="np-quote-wall <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-quote-card">
<div class="np-quote-text">“<?php echo wp_trim_words(get_the_excerpt(), 38); ?>”</div>
<div class="np-quote-source">— <?php the_title(); ?></div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('quote_wall_layout', 'np_quote_wall_layout_shortcode'); 75. Before-After Comparison

[before_after_comparison category=”” posts_per_page=”3″ offset=”0″ unique_group=”beforeafter1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_before_after_comparison_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 3, 'offset' => 0, 'unique_group' => 'beforeafter1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-before-after {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-ba-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(380px,1fr));gap:40px;}
.np-ba-card {position:relative;border:1px solid #ddd;border-radius:12px;overflow:hidden;}
.np-ba-card img {width:100%;height:320px;object-fit:cover;}
.np-ba-label {position:absolute;top:16px;background:rgba(200,16,46,0.9);color:#fff;padding:6px 18px;font-size:14px;font-weight:600;}
.np-ba-title {padding:18px;font-size:1.3rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-before-after <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-ba-grid">
<?php $side = true; while($query->have_posts()) : $query->the_post(); ?>
<div class="np-ba-card">
<div class="np-ba-label"><?php echo $side ? 'BEFORE' : 'AFTER'; ?></div>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-ba-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></div>
</div>
<?php $side = !$side; endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('before_after_comparison', 'np_before_after_comparison_shortcode'); 76. Live Score Ticker

[live_score_ticker category=”” posts_per_page=”5″ offset=”0″ unique_group=”liveticker1″ title_color=”#ffffff” padding=”12″ custom_class=””]
function np_live_score_ticker_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'liveticker1',
'title_color' => '#ffffff', 'padding' => '12', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-live-ticker {background:#111;color:<?php echo esc_attr($atts['title_color']); ?>;padding:<?php echo esc_attr($atts['padding']); ?>px 0;overflow:hidden;white-space:nowrap;}
.np-ticker-content {display:inline-block;animation:np-ticker-slide 35s linear infinite;}
@keyframes np-ticker-slide {0%{transform:translateX(0);} 100%{transform:translateX(-50%);}}
.np-ticker-item {display:inline-block;margin:0 40px;font-weight:600;}
</style>
<div class="np-live-ticker <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-ticker-content">
<?php while($query->have_posts()) : $query->the_post(); ?>
<span class="np-ticker-item">🏆 <?php the_title(); ?> • <?php echo get_the_date('H:i'); ?> </span>
<?php endwhile; ?>
<!-- Duplicate for seamless loop -->
<?php while($query->have_posts()) : $query->the_post(); ?>
<span class="np-ticker-item">🏆 <?php the_title(); ?> • <?php echo get_the_date('H:i'); ?> </span>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('live_score_ticker', 'np_live_score_ticker_shortcode'); 77. Trending Hashtag Cloud

[trending_hashtag_cloud category=”” posts_per_page=”8″ offset=”0″ unique_group=”hashtagcloud1″ title_color=”#c8102e” padding=”35″ custom_class=””]
function np_trending_hashtag_cloud_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'hashtagcloud1',
'title_color' => '#c8102e', 'padding' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-hashtag-cloud {padding:<?php echo esc_attr($atts['padding']); ?>px 0;text-align:center;}
.np-hashtag {display:inline-block;margin:8px 6px;padding:8px 22px;background:#f1f1f1;border-radius:30px;font-weight:600;color:#333;transition:all .3s;}
.np-hashtag:hover {background:#c8102e;color:#fff;transform:scale(1.08);}
</style>
<div class="np-hashtag-cloud <?php echo esc_attr($atts['custom_class']); ?>">
<h3 style="margin-bottom:24px;color:<?php echo esc_attr($atts['title_color']); ?>;">Trending Topics</h3>
<?php while($query->have_posts()) : $query->the_post(); ?>
<a href="<?php the_permalink(); ?>" class="np-hashtag">#<?php echo str_replace(' ', '', get_the_title()); ?></a>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('trending_hashtag_cloud', 'np_trending_hashtag_cloud_shortcode'); 78. Newsletter Signup Inline

Usage Example: [fitness_tips_section tag=”fitness” num=”6″ gap=”22px”]
function np_newsletter_signup_inline_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'newsletter1',
'title_color' => '#111', 'padding' => '50', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-newsletter-inline {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:#f8f8f8;text-align:center;border-radius:12px;}
.np-newsletter-title {font-size:2.1rem;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;margin-bottom:12px;}
.np-newsletter-form input {padding:16px 22px;width:320px;max-width:100%;border:1px solid #ccc;border-radius:6px;margin:10px;}
.np-newsletter-form button {background:#c8102e;color:#fff;padding:16px 42px;border:none;border-radius:6px;font-weight:700;cursor:pointer;}
</style>
<div class="np-newsletter-inline <?php echo esc_attr($atts['custom_class']); ?>">
<h2 class="np-newsletter-title">Stay Updated with <?php echo esc_html(get_the_title($post)); ?></h2>
<form class="np-newsletter-form">
<input type="email" placeholder="Your email address" required>
<button type="submit">Subscribe Now</button>
</form>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('newsletter_signup_inline', 'np_newsletter_signup_inline_shortcode'); 79. Gallery Lightbox Grid

[gallery_lightbox_grid category=”” posts_per_page=”8″ offset=”0″ unique_group=”lightbox1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_gallery_lightbox_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'lightbox1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-lightbox-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-lightbox-item {position:relative;cursor:pointer;overflow:hidden;border-radius:10px;}
.np-lightbox-item img {width:100%;height:240px;object-fit:cover;transition:transform .5s;}
.np-lightbox-item:hover img {transform:scale(1.12);}
.np-lightbox-overlay {position:absolute;inset:0;background:rgba(0,0,0,0.5);opacity:0;transition:opacity .3s;display:flex;align-items:center;justify-content:center;color:#fff;}
.np-lightbox-item:hover .np-lightbox-overlay {opacity:1;}
</style>
<div class="np-lightbox-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-lightbox-item" onclick="alert('Lightbox would open here for: <?php echo esc_js(get_the_title()); ?>');">
<?php the_post_thumbnail('medium'); ?>
<div class="np-lightbox-overlay">View Full</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('gallery_lightbox_grid', 'np_gallery_lightbox_grid_shortcode'); 80. Animated Number Stats

[animated_number_stats category=”” posts_per_page=”4″ offset=”0″ unique_group=”numstats1″ title_color=”#c8102e” padding=”45″ custom_class=””]
function np_animated_number_stats_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'numstats1',
'title_color' => '#c8102e', 'padding' => '45', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-num-stats {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:flex;flex-wrap:wrap;gap:40px;justify-content:center;}
.np-stat-item {text-align:center;min-width:180px;}
.np-stat-number {font-size:3.8rem;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;line-height:1;}
.np-stat-label {font-size:1.1rem;color:#555;margin-top:8px;}
</style>
<div class="np-num-stats <?php echo esc_attr($atts['custom_class']); ?>">
<?php $i=1; while($query->have_posts()) : $query->the_post(); ?>
<div class="np-stat-item">
<div class="np-stat-number" data-count="<?php echo 1000 + $i*2500; ?>">0</div>
<div class="np-stat-label"><?php the_title(); ?></div>
</div>
<?php $i++; endwhile; ?>
</div>
<script>
document.querySelectorAll('.np-stat-number').forEach(el => {
let count = 0;
const target = parseInt(el.getAttribute('data-count'));
const increment = Math.ceil(target / 60);
const timer = setInterval(() => {
count += increment;
if (count >= target) { count = target; clearInterval(timer); }
el.textContent = count.toLocaleString();
}, 30);
});
</script>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('animated_number_stats', 'np_animated_number_stats_shortcode'); 81. Sticky Sidebar Related

[sticky_sidebar_related category=”” posts_per_page=”5″ offset=”0″ unique_group=”stickysidebar1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_sticky_sidebar_related_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'stickysidebar1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-sticky-sidebar {padding:<?php echo esc_attr($atts['padding']); ?>px 20px;background:#fff;border:1px solid #eee;border-radius:12px;position:sticky;top:40px;}
.np-sticky-header {font-size:1.25rem;font-weight:700;color:#c8102e;margin-bottom:22px;}
.np-sticky-item {display:flex;gap:16px;margin-bottom:24px;}
.np-sticky-item:last-child {margin-bottom:0;}
.np-sticky-img img {width:92px;height:68px;object-fit:cover;border-radius:6px;}
.np-sticky-title {font-size:1.05rem;line-height:1.4;font-weight:600;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-sticky-sidebar <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-sticky-header">Related Stories</div>
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-sticky-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
<h4 class="np-sticky-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('sticky_sidebar_related', 'np_sticky_sidebar_related_shortcode'); 82. Gradient Background Cards

[gradient_background_cards category=”” posts_per_page=”6″ offset=”0″ unique_group=”gradientcards1″ title_color=”#ffffff” border_radius=”14″ padding=”35″ custom_class=””]
function np_gradient_background_cards_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'gradientcards1',
'title_color' => '#ffffff', 'border_radius' => '14', 'padding' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-gradient-cards {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:28px;}
.np-gradient-card {background:linear-gradient(135deg,#c8102e,#8a0f24);color:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 12px 35px rgba(200,16,46,0.35);transition:transform .4s;}
.np-gradient-card:hover {transform:translateY(-12px);}
.np-gradient-card img {width:100%;height:220px;object-fit:cover;filter:brightness(0.85);}
.np-gradient-body {padding:24px;}
.np-gradient-title {font-size:1.32rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-gradient-cards <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-gradient-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-gradient-body">
<h3 class="np-gradient-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('gradient_background_cards', 'np_gradient_background_cards_shortcode'); 83. Dual Hero Side-by-Side

[dual_hero_side_by_side category=”” posts_per_page=”2″ offset=”0″ unique_group=”dualhero1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_dual_hero_side_by_side_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 2, 'offset' => 0, 'unique_group' => 'dualhero1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>2,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-dual-hero {display:grid;grid-template-columns:1fr 1fr;gap:0;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-dual-hero-item {height:82vh;position:relative;background-size:cover;background-position:center;display:flex;align-items:flex-end;color:#fff;}
.np-dual-hero-item::before {content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(0,0,0,0.75));}
.np-dual-hero-content {position:relative;z-index:2;padding:50px 40px;width:100%;}
.np-dual-hero-title {font-size:clamp(2rem,5vw,3.8rem);line-height:1.15;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-dual-hero {grid-template-columns:1fr;}}
</style>
<div class="np-dual-hero <?php echo esc_attr($atts['custom_class']); ?>">
<?php foreach($posts as $post) : setup_postdata($post); ?>
<div class="np-dual-hero-item" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($post->ID,'full')); ?>');">
<div class="np-dual-hero-content">
<h2 class="np-dual-hero-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h2>
</div>
</div>
<?php endforeach; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('dual_hero_side_by_side', 'np_dual_hero_side_by_side_shortcode'); 84. Compact Mobile-First Stack

[compact_mobile_first_stack category=”” posts_per_page=”7″ offset=”0″ unique_group=”compactstack1″ title_color=”#111″ padding=”20″ custom_class=””]
function np_compact_mobile_first_stack_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 7, 'offset' => 0, 'unique_group' => 'compactstack1',
'title_color' => '#111', 'padding' => '20', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-compact-stack {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-compact-item {display:flex;gap:18px;padding-bottom:28px;margin-bottom:28px;border-bottom:1px solid #f0f0f0;}
.np-compact-item:last-child {border-bottom:none;margin-bottom:0;padding-bottom:0;}
.np-compact-img img {width:110px;height:82px;object-fit:cover;border-radius:8px;flex-shrink:0;}
.np-compact-title {font-size:1.15rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:576px) {.np-compact-item {flex-direction:column;gap:12px;}}
</style>
<div class="np-compact-stack <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-compact-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
<div>
<h3 class="np-compact-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('compact_mobile_first_stack', 'np_compact_mobile_first_stack_shortcode'); 85. Photo Essay Full-Bleed

[photo_essay_full_bleed category=”” posts_per_page=”4″ offset=”0″ unique_group=”photoessay1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_photo_essay_full_bleed_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'photoessay1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-photo-essay {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-essay-slide {height:100vh;position:relative;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;color:#fff;}
.np-essay-slide::before {content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(0,0,0,0.85));}
.np-essay-content {position:relative;z-index:2;text-align:center;padding:0 30px;max-width:920px;}
.np-essay-title {font-size:clamp(2.4rem,7vw,5.2rem);line-height:1.1;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-photo-essay <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-essay-slide" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url(null,'full')); ?>');">
<div class="np-essay-content">
<h1 class="np-essay-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h1>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('photo_essay_full_bleed', 'np_photo_essay_full_bleed_shortcode'); 86. Interactive Poll Block

[interactive_poll_block category=”” posts_per_page=”1″ offset=”0″ unique_group=”poll1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_interactive_poll_block_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'poll1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-poll-block {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:#f8f9fa;border-radius:14px;}
.np-poll-question {font-size:1.6rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin-bottom:28px;}
.np-poll-option {background:#fff;margin:12px 0;padding:16px 22px;border-radius:8px;cursor:pointer;border:2px solid #eee;transition:all .3s;}
.np-poll-option:hover {border-color:#c8102e;}
</style>
<div class="np-poll-block <?php echo esc_attr($atts['custom_class']); ?>">
<h3 class="np-poll-question">Poll: <?php echo esc_html(get_the_title($post)); ?></h3>
<div class="np-poll-option">Option A - Strongly Agree</div>
<div class="np-poll-option">Option B - Disagree</div>
<div class="np-poll-option">Option C - Neutral</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('interactive_poll_block', 'np_interactive_poll_block_shortcode'); 87. Newspaper Column Mimic

[newspaper_column_mimic category=”” posts_per_page=”5″ offset=”0″ unique_group=”newspapercol1″ title_color=”#111″ padding=”50″ custom_class=””]
function np_newspaper_column_mimic_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'newspapercol1',
'title_color' => '#111', 'padding' => '50', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-newspaper-cols {padding:<?php echo esc_attr($atts['padding']); ?>px 0;column-count:3;column-gap:50px;max-width:1280px;margin:0 auto;}
.np-newspaper-item {break-inside:avoid;margin-bottom:55px;}
.np-newspaper-title {font-size:1.4rem;line-height:1.45;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;margin-bottom:14px;}
@media (max-width:992px) {.np-newspaper-cols {column-count:2;}}
@media (max-width:640px) {.np-newspaper-cols {column-count:1;}}
</style>
<div class="np-newspaper-cols <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-newspaper-item">
<h2 class="np-newspaper-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h2>
<p style="text-align:justify;"><?php echo wp_trim_words(get_the_excerpt(), 48); ?></p>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('newspaper_column_mimic', 'np_newspaper_column_mimic_shortcode'); 88. Card Flip Effect

[card_flip_effect category=”” posts_per_page=”6″ offset=”0″ unique_group=”cardflip1″ title_color=”#111″ border_radius=”16″ padding=”30″ custom_class=””]
function np_card_flip_effect_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'cardflip1',
'title_color' => '#111', 'border_radius' => '16', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-flip-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:28px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-flip-card {perspective:1200px;height:380px;}
.np-flip-inner {position:relative;width:100%;height:100%;transition:transform 0.7s;transform-style:preserve-3d;}
.np-flip-card:hover .np-flip-inner {transform:rotateY(180deg);}
.np-flip-front, .np-flip-back {position:absolute;width:100%;height:100%;backface-visibility:hidden;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,0.15);}
.np-flip-back {transform:rotateY(180deg);background:#111;color:#fff;padding:28px;display:flex;flex-direction:column;justify-content:center;}
.np-flip-front img {width:100%;height:100%;object-fit:cover;}
.np-flip-title {font-size:1.35rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-flip-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-flip-card">
<div class="np-flip-inner">
<div class="np-flip-front">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
</div>
<div class="np-flip-back">
<h3 class="np-flip-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<p style="margin-top:16px;opacity:0.9;"><?php echo wp_trim_words(get_the_excerpt(), 32); ?></p>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('card_flip_effect', 'np_card_flip_effect_shortcode'); 89. Full-Width Breaking Bar

[full_width_breaking_bar category=”” posts_per_page=”4″ offset=”0″ unique_group=”breakingbar1″ title_color=”#ffffff” padding=”14″ custom_class=””]
function np_full_width_breaking_bar_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'breakingbar1',
'title_color' => '#ffffff', 'padding' => '14', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-breaking-bar {background:#c8102e;color:<?php echo esc_attr($atts['title_color']); ?>;padding:<?php echo esc_attr($atts['padding']); ?>px 0;overflow:hidden;white-space:nowrap;}
.np-breaking-content {display:inline-block;animation:np-breaking-slide 40s linear infinite;}
@keyframes np-breaking-slide {0%{transform:translateX(0);} 100%{transform:translateX(-50%);}}
.np-breaking-item {display:inline-block;margin:0 60px;font-weight:700;}
</style>
<div class="np-breaking-bar <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-breaking-content">
<?php while($query->have_posts()) : $query->the_post(); ?>
<span class="np-breaking-item">🚨 BREAKING: <?php the_title(); ?> </span>
<?php endwhile; ?>
<?php while($query->have_posts()) : $query->the_post(); ?>
<span class="np-breaking-item">🚨 BREAKING: <?php the_title(); ?> </span>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('full_width_breaking_bar', 'np_full_width_breaking_bar_shortcode'); 90. Grid with Hover Zoom

[grid_with_hover_zoom category=”” posts_per_page=”6″ offset=”0″ unique_group=”hoverzoom1″ title_color=”#111″ border_radius=”12″ padding=”30″ custom_class=””]
function np_grid_with_hover_zoom_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'hoverzoom1',
'title_color' => '#111', 'border_radius' => '12', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-hover-zoom-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-zoom-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.1);transition:all .4s;}
.np-zoom-card:hover {transform:scale(1.06);}
.np-zoom-card img {width:100%;height:230px;object-fit:cover;transition:transform .6s;}
.np-zoom-card:hover img {transform:scale(1.15);}
.np-zoom-body {padding:20px;}
.np-zoom-title {font-size:1.28rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-hover-zoom-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-zoom-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-zoom-body">
<h3 class="np-zoom-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('grid_with_hover_zoom', 'np_grid_with_hover_zoom_shortcode'); 91. Vertical Timeline Events

[vertical_timeline_events category=”” posts_per_page=”6″ offset=”0″ unique_group=”vtimeline1″ title_color=”#111″ padding=”50″ custom_class=””]
function np_vertical_timeline_events_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'vtimeline1',
'title_color' => '#111', 'padding' => '50', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-vtimeline {padding:<?php echo esc_attr($atts['padding']); ?>px 0;position:relative;}
.np-vtimeline::before {content:"";position:absolute;left:48px;top:0;bottom:0;width:4px;background:#c8102e;opacity:0.2;}
.np-vtimeline-event {display:flex;gap:40px;margin-bottom:60px;position:relative;}
.np-vtimeline-dot {width:32px;height:32px;background:#c8102e;border:5px solid #fff;border-radius:50%;flex-shrink:0;z-index:2;}
.np-vtimeline-content {flex:1;background:#fff;padding:28px;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,0.1);}
.np-vtimeline-date {color:#c8102e;font-weight:700;}
.np-vtimeline-title {font-size:1.45rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin:12px 0 16px;}
</style>
<div class="np-vtimeline <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-vtimeline-event">
<div class="np-vtimeline-dot"></div>
<div class="np-vtimeline-content">
<div class="np-vtimeline-date"><?php echo get_the_date('d M Y'); ?></div>
<h3 class="np-vtimeline-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<p><?php echo wp_trim_words(get_the_excerpt(), 35); ?></p>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('vertical_timeline_events', 'np_vertical_timeline_events_shortcode'); 92. Opinion vs Fact Split

[opinion_vs_fact_split category=”” posts_per_page=”4″ offset=”0″ unique_group=”opinionfact1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_opinion_vs_fact_split_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'opinionfact1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-opfact-split {display:grid;grid-template-columns:1fr 1fr;gap:40px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-opfact-column {padding:28px;border-radius:12px;}
.np-opfact-opinion {background:#fff0f0;border-left:6px solid #c8102e;}
.np-opfact-fact {background:#f0f8ff;border-left:6px solid #0066cc;}
.np-opfact-title {font-size:1.4rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin-bottom:16px;}
@media (max-width:992px) {.np-opfact-split {grid-template-columns:1fr;}}
</style>
<div class="np-opfact-split <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-opfact-column np-opfact-opinion">
<h3 style="color:#c8102e;">Opinion</h3>
<?php if ($query->have_posts()) : $query->the_post(); ?>
<h4 class="np-opfact-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
<p><?php echo wp_trim_words(get_the_excerpt(), 45); ?></p>
<?php endif; ?>
</div>
<div class="np-opfact-column np-opfact-fact">
<h3 style="color:#0066cc;">Fact Check</h3>
<?php if ($query->have_posts()) : $query->the_post(); ?>
<h4 class="np-opfact-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
<p><?php echo wp_trim_words(get_the_excerpt(), 45); ?></p>
<?php endif; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('opinion_vs_fact_split', 'np_opinion_vs_fact_split_shortcode'); 93. International Map Pins

[international_map_pins category=”” posts_per_page=”5″ offset=”0″ unique_group=”mappins1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_international_map_pins_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'mappins1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-map-pins {padding:<?php echo esc_attr($atts['padding']); ?>px 0;position:relative;height:520px;background:#f4f4f4;border-radius:16px;overflow:hidden;}
.np-map-pins::before {content:"";position:absolute;inset:0;background:url('https://via.placeholder.com/1200x520/eeeeee/999999?text=World+Map') center/cover no-repeat;opacity:0.6;}
.np-pin {position:absolute;width:28px;height:28px;background:#c8102e;border:4px solid #fff;border-radius:50%;box-shadow:0 0 0 6px rgba(200,16,46,0.3);cursor:pointer;}
.np-pin:hover {transform:scale(1.4);}
.np-pin-label {position:absolute;bottom:100%;left:50%;transform:translateX(-50%);background:#fff;padding:6px 14px;border-radius:6px;white-space:nowrap;box-shadow:0 4px 15px rgba(0,0,0,0.2);font-size:0.95rem;color:<?php echo esc_attr($atts['title_color']); ?>;display:none;}
.np-pin:hover .np-pin-label {display:block;}
</style>
<div class="np-map-pins <?php echo esc_attr($atts['custom_class']); ?>">
<?php $positions = [[25,35],[45,60],[70,25],[55,75],[30,80]]; $i=0; while($query->have_posts()) : $query->the_post(); ?>
<div class="np-pin" style="left:<?php echo $positions[$i][0]; ?>%;top:<?php echo $positions[$i][1]; ?>%;">
<div class="np-pin-label"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></div>
</div>
<?php $i++; endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('international_map_pins', 'np_international_map_pins_shortcode'); 94. Podcast Episode Grid

[podcast_episode_grid category=”” posts_per_page=”6″ offset=”0″ unique_group=”podcastgrid1″ title_color=”#111″ border_radius=”12″ padding=”35″ custom_class=””]
function np_podcast_episode_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'podcastgrid1',
'title_color' => '#111', 'border_radius' => '12', 'padding' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-podcast-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-podcast-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.1);}
.np-podcast-card img {width:100%;height:180px;object-fit:cover;}
.np-podcast-wave {height:48px;background:repeating-linear-gradient(90deg,#c8102e,#c8102e 8px,transparent 8px,transparent 16px);margin:12px 0;}
.np-podcast-body {padding:18px;}
.np-podcast-title {font-size:1.22rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-podcast-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-podcast-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-podcast-wave"></div>
<div class="np-podcast-body">
<h3 class="np-podcast-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('podcast_episode_grid', 'np_podcast_episode_grid_shortcode'); 95. Seasonal Festival Banner

[seasonal_festival_banner category=”” posts_per_page=”1″ offset=”0″ unique_group=”festivalbanner1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_seasonal_festival_banner_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'festivalbanner1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-festival-banner {height:520px;position:relative;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;color:#fff;overflow:hidden;}
.np-festival-banner::before {content:"";position:absolute;inset:0;background:linear-gradient(45deg,rgba(200,16,46,0.8),rgba(255,140,0,0.6));}
.np-festival-content {position:relative;z-index:2;text-align:center;}
.np-festival-title {font-size:clamp(3rem,8vw,5.5rem);font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;line-height:1.05;}
</style>
<div class="np-festival-banner <?php echo esc_attr($atts['custom_class']); ?>" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($post->ID,'full')); ?>');">
<div class="np-festival-content">
<h1 class="np-festival-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h1>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('seasonal_festival_banner', 'np_seasonal_festival_banner_shortcode'); 96. Reader Comment Teaser

[reader_comment_teaser category=”” posts_per_page=”4″ offset=”0″ unique_group=”commentteaser1″ title_color=”#111″ padding=”35″ custom_class=””]
function np_reader_comment_teaser_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'commentteaser1',
'title_color' => '#111', 'padding' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-comment-teaser {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-comment-item {background:#fff;padding:24px;border-radius:12px;box-shadow:0 6px 20px rgba(0,0,0,0.08);margin-bottom:24px;}
.np-comment-avatar {width:48px;height:48px;border-radius:50%;background:#ddd;float:left;margin-right:18px;}
.np-comment-text {overflow:hidden;}
.np-comment-title {font-size:1.15rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin-bottom:8px;}
</style>
<div class="np-comment-teaser <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-comment-item">
<div class="np-comment-avatar"></div>
<div class="np-comment-text">
<h4 class="np-comment-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
<p style="color:#666;">“Great analysis on this story...”</p>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('reader_comment_teaser', 'np_reader_comment_teaser_shortcode'); 97. Data Visualization Cards

[data_visualization_cards category=”” posts_per_page=”4″ offset=”0″ unique_group=”dataviz1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_data_visualization_cards_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'dataviz1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-dataviz-cards {display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:28px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-dataviz-card {background:#fff;padding:28px;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,0.1);text-align:center;}
.np-dataviz-bar {height:180px;background:linear-gradient(#c8102e,#ff8a00);margin:20px auto;width:70%;border-radius:8px;position:relative;}
.np-dataviz-title {font-size:1.3rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-dataviz-cards <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-dataviz-card">
<div class="np-dataviz-bar"></div>
<h3 class="np-dataviz-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('data_visualization_cards', 'np_data_visualization_cards_shortcode'); 98. Editorial Cartoon Spotlight

[editorial_cartoon_spotlight category=”” posts_per_page=”3″ offset=”0″ unique_group=”cartoon1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_editorial_cartoon_spotlight_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 3, 'offset' => 0, 'unique_group' => 'cartoon1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-cartoon-spotlight {padding:<?php echo esc_attr($atts['padding']); ?>px 0;text-align:center;}
.np-cartoon-item {display:inline-block;margin:0 20px;max-width:360px;}
.np-cartoon-item img {width:100%;border:12px solid #fff;box-shadow:0 15px 40px rgba(0,0,0,0.2);border-radius:8px;}
.np-cartoon-caption {margin-top:18px;font-style:italic;color:<?php echo esc_attr($atts['title_color']); ?>;font-size:1.1rem;}
</style>
<div class="np-cartoon-spotlight <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-cartoon-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-cartoon-caption"><?php the_title(); ?></div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('editorial_cartoon_spotlight', 'np_editorial_cartoon_spotlight_shortcode'); 99. Compact Widget Cluster

[compact_widget_cluster category=”” posts_per_page=”6″ offset=”0″ unique_group=”widgetcluster1″ title_color=”#111″ padding=”25″ custom_class=””]
function np_compact_widget_cluster_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'widgetcluster1',
'title_color' => '#111', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-widget-cluster {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:flex;flex-wrap:wrap;gap:18px;}
.np-widget-small {flex:1 1 180px;background:#fff;padding:18px;border-radius:10px;box-shadow:0 4px 15px rgba(0,0,0,0.08);min-width:160px;}
.np-widget-title {font-size:1.05rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-widget-cluster <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-widget-small">
<h4 class="np-widget-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('compact_widget_cluster', 'np_compact_widget_cluster_shortcode'); 100. Video Background Hero

[video_background_hero category=”” posts_per_page=”1″ offset=”0″ unique_group=”videobg1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_video_background_hero_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'videobg1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-video-hero {height:100vh;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;color:#fff;}
.np-video-hero video {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0.85;}
.np-video-overlay {position:absolute;inset:0;background:linear-gradient(rgba(0,0,0,0.3),rgba(200,16,46,0.7));}
.np-video-content {position:relative;z-index:2;text-align:center;max-width:860px;padding:0 30px;}
.np-video-title {font-size:clamp(3.2rem,9vw,6rem);line-height:1.05;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-video-hero <?php echo esc_attr($atts['custom_class']); ?>">
<video autoplay muted loop playsinline>
<source src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4">
</video>
<div class="np-video-overlay"></div>
<div class="np-video-content">
<h1 class="np-video-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h1>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('video_background_hero', 'np_video_background_hero_shortcode'); 101. Multi-Layer Parallax

[multi_layer_parallax category=”” posts_per_page=”1″ offset=”0″ unique_group=”parallaxmulti1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_multi_layer_parallax_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'parallaxmulti1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-multi-parallax {height:100vh;position:relative;overflow:hidden;}
.np-parallax-bg {position:absolute;inset:0;background-size:cover;background-position:center;will-change:transform;}
.np-parallax-layer1 {background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($post->ID,'full')); ?>');}
.np-parallax-layer2 {background:linear-gradient(transparent,rgba(200,16,46,0.6));}
.np-parallax-content {position:relative;z-index:3;height:100%;display:flex;align-items:center;justify-content:center;text-align:center;}
.np-parallax-title {font-size:clamp(3.5rem,10vw,7rem);line-height:1.05;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-multi-parallax <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-parallax-bg np-parallax-layer1"></div>
<div class="np-parallax-bg np-parallax-layer2"></div>
<div class="np-parallax-content">
<h1 class="np-parallax-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h1>
</div>
</div>
<script>
window.addEventListener('scroll', () => {
const scroll = window.scrollY * 0.5;
document.querySelectorAll('.np-parallax-bg').forEach((layer, i) => {
layer.style.transform = `translateY(${scroll * (i + 1) * 0.3}px)`;
});
});
</script>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('multi_layer_parallax', 'np_multi_layer_parallax_shortcode'); 102. Minimal Text-Only Feed

[minimal_text_only_feed category=”” posts_per_page=”8″ offset=”0″ unique_group=”textonly1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_minimal_text_only_feed_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'textonly1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-text-only {padding:<?php echo esc_attr($atts['padding']); ?>px 0;max-width:820px;margin:0 auto;}
.np-text-item {padding:22px 0;border-bottom:1px solid #eee;}
.np-text-item:last-child {border-bottom:none;}
.np-text-title {font-size:1.38rem;line-height:1.45;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-text-date {color:#888;font-size:0.95rem;}
</style>
<div class="np-text-only <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-text-item">
<div class="np-text-date"><?php echo get_the_date(); ?></div>
<h2 class="np-text-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h2>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('minimal_text_only_feed', 'np_minimal_text_only_feed_shortcode'); 103. Big Image Masonry

[big_image_masonry category=”” posts_per_page=”7″ offset=”0″ unique_group=”bigimagemasonry1″ title_color=”#ffffff” padding=”30″ custom_class=””]
function np_big_image_masonry_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 7, 'offset' => 0, 'unique_group' => 'bigimagemasonry1',
'title_color' => '#ffffff', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-big-masonry {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px;}
.np-big-masonry-item {position:relative;border-radius:12px;overflow:hidden;height:320px;}
.np-big-masonry-item:nth-child(3n+1) {grid-row:span 2;height:660px;}
.np-big-masonry-item img {width:100%;height:100%;object-fit:cover;}
.np-big-masonry-overlay {position:absolute;inset:0;background:linear-gradient(transparent,rgba(0,0,0,0.75));display:flex;align-items:flex-end;padding:24px;}
.np-big-masonry-title {font-size:1.25rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-big-masonry <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-big-masonry-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-big-masonry-overlay">
<h3 class="np-big-masonry-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('big_image_masonry', 'np_big_image_masonry_shortcode'); 104. Carousel with Thumbnails

[carousel_with_thumbnails category=”” posts_per_page=”5″ offset=”0″ unique_group=”thumbcarousel1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_carousel_with_thumbnails_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'thumbcarousel1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-thumb-carousel {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-main-slide {height:520px;position:relative;border-radius:16px;overflow:hidden;}
.np-main-slide img {width:100%;height:100%;object-fit:cover;}
.np-main-title {position:absolute;bottom:40px;left:40px;right:40px;color:<?php echo esc_attr($atts['title_color']); ?>;font-size:2.1rem;font-weight:800;}
.np-thumbs {display:flex;gap:12px;margin-top:20px;overflow-x:auto;padding-bottom:10px;}
.np-thumb-item {width:120px;height:80px;flex-shrink:0;border-radius:8px;overflow:hidden;cursor:pointer;border:3px solid transparent;}
.np-thumb-item.active {border-color:#c8102e;}
.np-thumb-item img {width:100%;height:100%;object-fit:cover;}
</style>
<div class="np-thumb-carousel <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-main-slide" id="mainSlide_<?php echo esc_attr($atts['unique_group']); ?>">
<img src="<?php echo esc_url(get_the_post_thumbnail_url($posts[0]->ID,'large')); ?>" alt="">
<div class="np-main-title"><?php echo esc_html(get_the_title($posts[0])); ?></div>
</div>
<div class="np-thumbs">
<?php foreach($posts as $index => $p) : ?>
<div class="np-thumb-item <?php echo $index===0 ? 'active' : ''; ?>" onclick="switchSlide(this, '<?php echo esc_attr($atts['unique_group']); ?>', <?php echo $index; ?>)">
<?php echo get_the_post_thumbnail($p->ID, 'thumbnail'); ?>
</div>
<?php endforeach; ?>
</div>
</div>
<script>
function switchSlide(el, group, idx) {
document.querySelectorAll('.np-thumb-item').forEach(t => t.classList.remove('active'));
el.classList.add('active');
const main = document.getElementById('mainSlide_' + group);
main.querySelector('img').src = '<?php echo esc_url(get_the_post_thumbnail_url($posts[0]->ID,'large')); ?>'.replace(/\d+/, idx + 1); // simplified placeholder
main.querySelector('.np-main-title').textContent = '<?php echo esc_js(get_the_title($posts[0])); ?>';
}
</script>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('carousel_with_thumbnails', 'np_carousel_with_thumbnails_shortcode'); 105. Split Column Opinion

[split_column_opinion category=”” posts_per_page=”6″ offset=”0″ unique_group=”splitopinion1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_split_column_opinion_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'splitopinion1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-split-opinion {display:grid;grid-template-columns:1fr 1fr;gap:50px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-op-col {padding:0 20px;}
.np-op-col h3 {color:#c8102e;font-size:1.4rem;margin-bottom:24px;}
.np-op-item {margin-bottom:32px;}
.np-op-title {font-size:1.25rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-split-opinion {grid-template-columns:1fr;}}
</style>
<div class="np-split-opinion <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-op-col">
<h3>Opinion</h3>
<?php for($i=0; $i<3 && $query->have_posts(); $i++) : $query->the_post(); ?>
<div class="np-op-item">
<h4 class="np-op-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
</div>
<?php endfor; ?>
</div>
<div class="np-op-col">
<h3>Analysis</h3>
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-op-item">
<h4 class="np-op-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('split_column_opinion', 'np_split_column_opinion_shortcode'); 106. Hover Reveal Caption

[hover_reveal_caption_v2 category=”” posts_per_page=”6″ offset=”0″ unique_group=”hoverreveal2″ title_color=”#ffffff” padding=”30″ custom_class=””]
function np_hover_reveal_caption_v2_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'hoverreveal2',
'title_color' => '#ffffff', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-reveal-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:24px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-reveal-card {position:relative;height:340px;border-radius:14px;overflow:hidden;}
.np-reveal-card img {width:100%;height:100%;object-fit:cover;transition:transform .6s;}
.np-reveal-card:hover img {transform:scale(1.12);}
.np-reveal-caption {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000);padding:40px 24px 24px;transform:translateY(50%);transition:transform .5s;}
.np-reveal-card:hover .np-reveal-caption {transform:translateY(0);}
.np-reveal-title {font-size:1.35rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-reveal-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-reveal-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-reveal-caption">
<h3 class="np-reveal-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('hover_reveal_caption_v2', 'np_hover_reveal_caption_v2_shortcode'); 107. Section Divider Lines

[section_divider_lines_v2 category=”” posts_per_page=”5″ offset=”0″ unique_group=”divider2″ title_color=”#111″ padding=”60″ custom_class=””]
function np_section_divider_lines_v2_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'divider2',
'title_color' => '#111', 'padding' => '60', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-divider-v2 {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-divider-v2-item {padding:40px 0;border-bottom:2px solid #eee;}
.np-divider-v2-item:last-child {border-bottom:none;}
.np-divider-v2-title {font-size:2rem;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;line-height:1.25;}
</style>
<div class="np-divider-v2 <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-divider-v2-item">
<h2 class="np-divider-v2-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h2>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('section_divider_lines_v2', 'np_section_divider_lines_v2_shortcode'); 108. Big Number Headline

[big_number_headline_v2 category=”” posts_per_page=”5″ offset=”0″ unique_group=”bignumber2″ title_color=”#c8102e” padding=”40″ custom_class=””]
function np_big_number_headline_v2_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'bignumber2',
'title_color' => '#c8102e', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-big-number-v2 {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-big-number-row {display:flex;gap:40px;align-items:flex-start;}
.np-big-num {font-size:7rem;line-height:1;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;opacity:0.9;}
.np-big-content {flex:1;}
.np-big-content h3 {font-size:1.5rem;font-weight:700;margin:0 0 12px;}
</style>
<div class="np-big-number-v2 <?php echo esc_attr($atts['custom_class']); ?>">
<?php $count = 1; while($query->have_posts()) : $query->the_post(); ?>
<div class="np-big-number-row">
<div class="np-big-num">0<?php echo $count++; ?></div>
<div class="np-big-content">
<h3><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<p style="color:#555;"><?php echo wp_trim_words(get_the_excerpt(), 25); ?></p>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('big_number_headline_v2', 'np_big_number_headline_v2_shortcode'); 109. Collage Overlap Grid

[collage_overlap_grid_v2 category=”” posts_per_page=”6″ offset=”0″ unique_group=”collage2″ title_color=”#ffffff” padding=”40″ custom_class=””]
function np_collage_overlap_grid_v2_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'collage2',
'title_color' => '#ffffff', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-collage-v2 {padding:<?php echo esc_attr($atts['padding']); ?>px 0;position:relative;}
.np-collage-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;}
.np-collage-card {position:relative;border:8px solid #fff;border-radius:14px;overflow:hidden;box-shadow:0 15px 40px rgba(0,0,0,0.25);transition:transform .4s;}
.np-collage-card:hover {transform:scale(1.05);z-index:10;}
.np-collage-card img {width:100%;height:280px;object-fit:cover;}
.np-collage-overlay {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000);padding:28px;color:#fff;}
</style>
<div class="np-collage-v2 <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-collage-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-collage-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-collage-overlay">
<h4 style="color:<?php echo esc_attr($atts['title_color']); ?>;"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('collage_overlap_grid_v2', 'np_collage_overlap_grid_v2_shortcode'); 110. Live Video Embed Grid

[live_video_embed_grid_v2 category=”” posts_per_page=”4″ offset=”0″ unique_group=”livevideo2″ title_color=”#111″ border_radius=”14″ padding=”35″ custom_class=””]
function np_live_video_embed_grid_v2_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'livevideo2',
'title_color' => '#111', 'border_radius' => '14', 'padding' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-live-video-v2 {display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:28px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-live-v-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 12px 35px rgba(0,0,0,0.15);position:relative;}
.np-live-v-card img {width:100%;height:210px;object-fit:cover;}
.np-live-play-btn {position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:68px;height:68px;background:rgba(200,16,46,0.95);border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:32px;}
.np-live-v-body {padding:20px;}
.np-live-v-title {font-size:1.25rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-live-video-v2 <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-live-v-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-live-play-btn">▶</div>
<div class="np-live-v-body">
<h3 class="np-live-v-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('live_video_embed_grid_v2', 'np_live_video_embed_grid_v2_shortcode'); 111. Split-Screen Hero

[split_screen_hero category=”” posts_per_page=”1″ offset=”0″ unique_group=”splitscreen1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_split_screen_hero_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'splitscreen1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-split-hero {display:grid;grid-template-columns:1fr 1fr;min-height:85vh;}
.np-split-image {background:url('<?php echo esc_url(get_the_post_thumbnail_url($post->ID,'full')); ?>') center/cover no-repeat;}
.np-split-text {background:#111;color:#fff;display:flex;align-items:center;padding:80px 60px;}
.np-split-title {font-size:clamp(2.8rem,6vw,5rem);line-height:1.1;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-split-cta {margin-top:30px;background:#c8102e;color:#fff;padding:16px 40px;border:none;border-radius:6px;font-size:1.1rem;cursor:pointer;}
@media (max-width:992px) {.np-split-hero {grid-template-columns:1fr;}}
</style>
<div class="np-split-hero <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-split-image"></div>
<div class="np-split-text">
<div>
<h1 class="np-split-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h1>
<button onclick="window.location='<?php echo esc_url(get_permalink($post)); ?>'" class="np-split-cta">Read Full Story →</button>
</div>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('split_screen_hero', 'np_split_screen_hero_shortcode'); 112. Multi-Column Grid (Even columns)

[multi_column_grid category=”” posts_per_page=”9″ offset=”0″ unique_group=”multicolumn1″ title_color=”#111″ columns=”3″ padding=”30″ custom_class=””]
function np_multi_column_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 9, 'offset' => 0, 'unique_group' => 'multicolumn1',
'title_color' => '#111', 'columns' => '3', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-multi-col-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(calc(100% / <?php echo intval($atts['columns']); ?> - 30px),1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-multi-col-card {background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 6px 20px rgba(0,0,0,0.09);}
.np-multi-col-card img {width:100%;height:200px;object-fit:cover;}
.np-multi-col-body {padding:20px;}
.np-multi-col-title {font-size:1.2rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-multi-col-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-multi-col-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-multi-col-body">
<h3 class="np-multi-col-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('multi_column_grid', 'np_multi_column_grid_shortcode'); 113. Masonry Waterfall Grid

[masonry_waterfall_grid category=”” posts_per_page=”8″ offset=”0″ unique_group=”masonrywf1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_masonry_waterfall_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'masonrywf1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-masonry-waterfall {padding:<?php echo esc_attr($atts['padding']); ?>px 0;column-count:3;column-gap:24px;}
.np-masonry-item {break-inside:avoid;margin-bottom:24px;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.1);}
.np-masonry-item img {width:100%;height:auto;display:block;}
.np-masonry-body {padding:18px;}
.np-masonry-title {font-size:1.18rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-masonry-waterfall {column-count:2;}}
@media (max-width:640px) {.np-masonry-waterfall {column-count:1;}}
</style>
<div class="np-masonry-waterfall <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-masonry-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-masonry-body">
<h3 class="np-masonry-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('masonry_waterfall_grid', 'np_masonry_waterfall_grid_shortcode'); 114. Magazine-Style Layout (Hierarchical with side columns)

[magazine_style_layout category=”” posts_per_page=”7″ offset=”0″ unique_group=”magstyle1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_magazine_style_layout_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 7, 'offset' => 0, 'unique_group' => 'magstyle1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-magazine-style {display:grid;grid-template-columns:2fr 1fr;gap:50px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-mag-featured {border-bottom:4px solid #c8102e;padding-bottom:30px;}
.np-mag-featured img {width:100%;height:520px;object-fit:cover;}
.np-mag-side {display:flex;flex-direction:column;gap:32px;}
.np-mag-side-item {display:flex;gap:20px;}
.np-mag-side-img img {width:140px;height:100px;object-fit:cover;border-radius:8px;}
.np-mag-title {font-size:1.55rem;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-mag-side-title {font-size:1.15rem;font-weight:700;}
@media (max-width:992px) {.np-magazine-style {grid-template-columns:1fr;}}
</style>
<div class="np-magazine-style <?php echo esc_attr($atts['custom_class']); ?>">
<div>
<div class="np-mag-featured">
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a>
<h2 class="np-mag-title"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h2>
</div>
</div>
<div class="np-mag-side">
<?php for($i=1; $i<count($posts); $i++) : ?>
<div class="np-mag-side-item">
<div class="np-mag-side-img"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'thumbnail'); ?></a></div>
<h4 class="np-mag-side-title"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h4>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('magazine_style_layout', 'np_magazine_style_layout_shortcode'); 115. Horizontal Scroll Carousel

[horizontal_scroll_carousel category=”” posts_per_page=”8″ offset=”0″ unique_group=”hscroll1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_horizontal_scroll_carousel_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'hscroll1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-hscroll {padding:<?php echo esc_attr($atts['padding']); ?>px 0;overflow-x:auto;scrollbar-width:none;}
.np-hscroll::-webkit-scrollbar {display:none;}
.np-hscroll-container {display:flex;gap:24px;width:max-content;}
.np-hscroll-card {min-width:280px;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.1);}
.np-hscroll-card img {width:100%;height:190px;object-fit:cover;}
.np-hscroll-body {padding:18px;}
.np-hscroll-title {font-size:1.2rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-hscroll <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-hscroll-container">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-hscroll-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-hscroll-body">
<h3 class="np-hscroll-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('horizontal_scroll_carousel', 'np_horizontal_scroll_carousel_shortcode'); 116. Breaking News Ticker

[breaking_news_ticker category=”” posts_per_page=”5″ offset=”0″ unique_group=”breakingticker1″ title_color=”#ffffff” padding=”12″ ticker_speed=”35″ custom_class=””]
function np_breaking_news_ticker_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'breakingticker1',
'title_color' => '#ffffff', 'padding' => '12', 'ticker_speed' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-breaking-ticker {background:#c8102e;color:<?php echo esc_attr($atts['title_color']); ?>;padding:<?php echo esc_attr($atts['padding']); ?>px 0;overflow:hidden;white-space:nowrap;}
.np-ticker-inner {display:inline-block;animation:np-ticker <?php echo esc_attr($atts['ticker_speed']); ?>s linear infinite;}
@keyframes np-ticker {0%{transform:translateX(0);} 100%{transform:translateX(-50%);}}
.np-ticker-item {display:inline-block;margin:0 50px;font-weight:700;}
</style>
<div class="np-breaking-ticker <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-ticker-inner">
<?php while($query->have_posts()) : $query->the_post(); ?>
<span class="np-ticker-item">🚨 <?php the_title(); ?></span>
<?php endwhile; ?>
<?php while($query->have_posts()) : $query->the_post(); ?>
<span class="np-ticker-item">🚨 <?php the_title(); ?></span>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('breaking_news_ticker', 'np_breaking_news_ticker_shortcode'); 117. Overlay Magazine Cards

[overlay_magazine_cards category=”” posts_per_page=”6″ offset=”0″ unique_group=”overlaymag1″ title_color=”#ffffff” padding=”30″ custom_class=””]
function np_overlay_magazine_cards_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'overlaymag1',
'title_color' => '#ffffff', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-overlay-mag {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-overlay-card {position:relative;height:380px;border-radius:14px;overflow:hidden;}
.np-overlay-card img {width:100%;height:100%;object-fit:cover;}
.np-overlay-gradient {position:absolute;inset:0;background:linear-gradient(transparent,rgba(0,0,0,0.85));}
.np-overlay-text {position:absolute;bottom:0;left:0;right:0;padding:32px;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-overlay-title {font-size:1.45rem;font-weight:800;line-height:1.3;}
</style>
<div class="np-overlay-mag <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-overlay-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-overlay-gradient"></div>
<div class="np-overlay-text">
<h3 class="np-overlay-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('overlay_magazine_cards', 'np_overlay_magazine_cards_shortcode'); 118. Hero + Vertical Stack

[hero_vertical_stack category=”” posts_per_page=”7″ offset=”0″ unique_group=”herostack1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_hero_vertical_stack_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 7, 'offset' => 0, 'unique_group' => 'herostack1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-hero-stack {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-hero-main {height:520px;position:relative;border-radius:16px;overflow:hidden;margin-bottom:50px;}
.np-hero-main img {width:100%;height:100%;object-fit:cover;}
.np-hero-overlay {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000);padding:40px;color:#fff;}
.np-hero-title {font-size:2.4rem;font-weight:900;}
.np-stack-list {display:flex;flex-direction:column;gap:28px;}
.np-stack-item {display:flex;gap:24px;}
.np-stack-img img {width:130px;height:92px;object-fit:cover;border-radius:8px;}
.np-stack-title {font-size:1.25rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-hero-stack <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-hero-main">
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a>
<div class="np-hero-overlay">
<h2 class="np-hero-title"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h2>
</div>
</div>
<div class="np-stack-list">
<?php for($i=1; $i<count($posts); $i++) : ?>
<div class="np-stack-item">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'thumbnail'); ?></a>
<h3 class="np-stack-title"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h3>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('hero_vertical_stack', 'np_hero_vertical_stack_shortcode'); 119. Left Hero + Right List

[left_hero_right_list category=”” posts_per_page=”6″ offset=”0″ unique_group=”lefthero1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_left_hero_right_list_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'lefthero1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-left-hero-right {display:grid;grid-template-columns:1.6fr 1fr;gap:50px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-left-hero {position:relative;height:620px;border-radius:16px;overflow:hidden;}
.np-left-hero img {width:100%;height:100%;object-fit:cover;}
.np-left-overlay {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000);padding:50px 40px;color:#fff;}
.np-left-title {font-size:2.6rem;font-weight:900;line-height:1.15;}
.np-right-list {display:flex;flex-direction:column;gap:32px;}
.np-right-item {display:flex;gap:22px;}
.np-right-img img {width:120px;height:85px;object-fit:cover;border-radius:8px;}
.np-right-title {font-size:1.22rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-left-hero-right {grid-template-columns:1fr;}}
</style>
<div class="np-left-hero-right <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-left-hero">
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a>
<div class="np-left-overlay">
<h2 class="np-left-title"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h2>
</div>
</div>
<div class="np-right-list">
<?php for($i=1; $i<count($posts); $i++) : ?>
<div class="np-right-item">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'thumbnail'); ?></a>
<h3 class="np-right-title"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h3>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('left_hero_right_list', 'np_left_hero_right_list_shortcode'); 120. Full-Width Hero Banner

[full_width_hero category=”” tags=”” posts_per_page=”1″ offset=”0″ orderby=”date” order=”DESC” unique_group=”hero1″ title_color=”#ffffff” show_excerpt=”yes” excerpt_length=”25″ show_category=”yes” border_radius=”0″ padding=”0″ custom_class=””]
function np_full_width_hero_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'tags' => '', 'post_type' => 'post', 'posts_per_page' => 1, 'offset' => 0,
'orderby' => 'date', 'order' => 'DESC', 'unique_group' => 'hero1',
'title_color' => '#ffffff', 'bg_color' => 'transparent', 'aspect_ratio' => '16:9',
'show_title' => 'yes', 'show_excerpt' => 'yes', 'excerpt_length' => 25,
'show_date' => 'no', 'show_category' => 'yes', 'border_radius' => '0',
'padding' => '0', 'custom_class' => ''
), $atts);
$args = array(
'post_type' => sanitize_text_field($atts['post_type']),
'posts_per_page' => intval($atts['posts_per_page']),
'offset' => intval($atts['offset']),
'orderby' => sanitize_text_field($atts['orderby']),
'order' => sanitize_text_field($atts['order'])
);
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
if (!empty($atts['tags'])) $args['tag'] = sanitize_text_field($atts['tags']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
ob_start(); ?>
<style>
.np-hero-full {position:relative;height:85vh;min-height:580px;background-size:cover;background-position:center;display:flex;align-items:center;color:#fff;overflow:hidden;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;padding:<?php echo esc_attr($atts['padding']); ?>px;background-color:<?php echo esc_attr($atts['bg_color']); ?>;}
.np-hero-full::before {content:"";position:absolute;inset:0;background:linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.75) 100%);}
.np-hero-content {position:relative;z-index:2;max-width:1100px;margin:0 auto;padding:0 20px;width:100%;}
.np-hero-category {background:#c8102e;color:#fff;padding:6px 18px;font-size:14px;display:inline-block;margin-bottom:15px;border-radius:4px;}
.np-hero-title {font-size:clamp(2.2rem, 5vw, 4.2rem);line-height:1.15;font-weight:800;margin:0 0 20px;}
.np-hero-excerpt {font-size:1.15rem;max-width:620px;margin-bottom:25px;}
.np-hero-readmore {background:#c8102e;color:#fff;padding:14px 32px;border-radius:6px;text-decoration:none;font-weight:600;transition:all .3s;}
.np-hero-readmore:hover {background:#a00d24;transform:translateY(-3px);}
@media (max-width:768px) {.np-hero-full {height:70vh;}}
</style>
<div class="np-hero-full <?php echo esc_attr($atts['custom_class']); ?>" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($query->posts[0]->ID, 'full')); ?>');">
<div class="np-hero-content">
<?php
$post = $query->posts[0];
setup_postdata($post);
$cat = get_the_category($post->ID);
?>
<?php if ($atts['show_category'] === 'yes' && $cat) : ?>
<div class="np-hero-category"><?php echo esc_html($cat[0]->name); ?></div>
<?php endif; ?>
<?php if ($atts['show_title'] === 'yes') : ?>
<h1 class="np-hero-title" style="color:<?php echo esc_attr($atts['title_color']); ?>;">
<?php echo esc_html(get_the_title()); ?>
</h1>
<?php endif; ?>
<?php if ($atts['show_excerpt'] === 'yes') : ?>
<p class="np-hero-excerpt"><?php echo wp_kses_post(wp_trim_words(get_the_excerpt(), intval($atts['excerpt_length']))); ?></p>
<?php endif; ?>
<a href="<?php echo esc_url(get_permalink()); ?>" class="np-hero-readmore">বিস্তারিত পড়ুন →</a>
</div>
</div>
<?php wp_reset_postdata();
return ob_get_clean();
}
add_shortcode('full_width_hero', 'np_full_width_hero_shortcode'); 121. Dynamic Load Spinner Grid

[dynamic_load_spinner_grid category=”” posts_per_page=”8″ offset=”0″ unique_group=”spinergrid1″ title_color=”#111″ border_radius=”12″ padding=”30″ custom_class=””]
function np_dynamic_load_spinner_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'spinergrid1',
'title_color' => '#111', 'border_radius' => '12', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-spinner-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-spinner-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.1);position:relative;}
.np-spinner-card img {width:100%;height:210px;object-fit:cover;}
.np-spinner-body {padding:20px;position:relative;}
.np-spinner-title {font-size:1.25rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-spinner-overlay {position:absolute;inset:0;background:rgba(200,16,46,0.1);display:none;align-items:center;justify-content:center;}
.np-spinner-card.loading .np-spinner-overlay {display:flex;}
.np-spinner {width:42px;height:42px;border:5px solid #c8102e;border-top-color:transparent;border-radius:50%;animation:np-spin 1s linear infinite;}
@keyframes np-spin {to{transform:rotate(360deg);}}
</style>
<div class="np-spinner-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-spinner-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-spinner-body">
<h3 class="np-spinner-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<div class="np-spinner-overlay"><div class="np-spinner"></div></div>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('dynamic_load_spinner_grid', 'np_dynamic_load_spinner_grid_shortcode'); 122. Featured Story Spotlight

[featured_story_spotlight category=”” posts_per_page=”1″ offset=”0″ unique_group=”spotlight1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_featured_story_spotlight_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'spotlight1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-spotlight {height:680px;position:relative;border-radius:20px;overflow:hidden;box-shadow:0 25px 60px rgba(200,16,46,0.4);margin:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-spotlight img {width:100%;height:100%;object-fit:cover;}
.np-spotlight::before {content:"";position:absolute;inset:0;background:radial-gradient(circle at 30% 70%,rgba(200,16,46,0.75),transparent 70%);}
.np-spotlight-content {position:absolute;bottom:60px;left:60px;right:60px;color:#fff;z-index:2;}
.np-spotlight-title {font-size:clamp(2.8rem,7vw,4.8rem);line-height:1.1;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-spotlight <?php echo esc_attr($atts['custom_class']); ?>">
<a href="<?php echo esc_url(get_permalink($post)); ?>"><?php echo get_the_post_thumbnail($post->ID, 'full'); ?></a>
<div class="np-spotlight-content">
<h1 class="np-spotlight-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h1>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('featured_story_spotlight', 'np_featured_story_spotlight_shortcode'); 123. Reader Poll Integration

[reader_poll_integration category=”” posts_per_page=”1″ offset=”0″ unique_group=”pollint1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_reader_poll_integration_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'pollint1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-poll-integration {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:#f8f9fa;border-radius:16px;}
.np-poll-header {font-size:1.55rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin-bottom:24px;}
.np-poll-option {background:#fff;padding:18px 24px;margin:12px 0;border-radius:10px;cursor:pointer;border:2px solid #eee;transition:all .3s;}
.np-poll-option:hover {border-color:#c8102e;}
</style>
<div class="np-poll-integration <?php echo esc_attr($atts['custom_class']); ?>">
<h2 class="np-poll-header">Poll: <?php echo esc_html(get_the_title($post)); ?></h2>
<div class="np-poll-option">Yes — Strongly support</div>
<div class="np-poll-option">No — Disagree</div>
<div class="np-poll-option">Maybe — Need more info</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('reader_poll_integration', 'np_reader_poll_integration_shortcode'); 124. Seasonal Color Theme

[seasonal_color_theme category=”” posts_per_page=”6″ offset=”0″ unique_group=”seasonal1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_seasonal_color_theme_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'seasonal1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-seasonal {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:linear-gradient(90deg,#c8102e,#ff8c00);color:#fff;}
.np-seasonal-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:24px;}
.np-seasonal-card {background:rgba(255,255,255,0.95);color:#111;border-radius:14px;padding:20px;box-shadow:0 10px 30px rgba(0,0,0,0.2);}
.np-seasonal-title {font-size:1.3rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-seasonal <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-seasonal-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-seasonal-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<h3 class="np-seasonal-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('seasonal_color_theme', 'np_seasonal_color_theme_shortcode'); 125. Compact Horizontal Mini-Cards

[compact_horizontal_mini_cards category=”” posts_per_page=”8″ offset=”0″ unique_group=”minihorizontal1″ title_color=”#111″ padding=”25″ custom_class=””]
function np_compact_horizontal_mini_cards_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'minihorizontal1',
'title_color' => '#111', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-mini-horizontal {padding:<?php echo esc_attr($atts['padding']); ?>px 0;overflow-x:auto;scrollbar-width:none;}
.np-mini-container {display:flex;gap:16px;width:max-content;}
.np-mini-card {min-width:210px;background:#fff;border-radius:10px;padding:14px;box-shadow:0 6px 18px rgba(0,0,0,0.1);}
.np-mini-card img {width:100%;height:120px;object-fit:cover;border-radius:8px;}
.np-mini-title {font-size:1.05rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin-top:12px;}
</style>
<div class="np-mini-horizontal <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-mini-container">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-mini-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
<h4 class="np-mini-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('compact_horizontal_mini_cards', 'np_compact_horizontal_mini_cards_shortcode'); 126. Full-Bleed Video Section

[full_bleed_video_section category=”” posts_per_page=”1″ offset=”0″ unique_group=”fullbleedvideo1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_full_bleed_video_section_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'fullbleedvideo1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-full-bleed-video {height:100vh;position:relative;overflow:hidden;}
.np-full-bleed-video video {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.np-video-content {position:relative;z-index:2;height:100%;display:flex;align-items:center;justify-content:center;text-align:center;padding:0 30px;}
.np-video-title {font-size:clamp(3rem,8vw,6rem);line-height:1.05;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-full-bleed-video <?php echo esc_attr($atts['custom_class']); ?>">
<video autoplay muted loop playsinline>
<source src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4">
</video>
<div class="np-video-content">
<h1 class="np-video-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h1>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('full_bleed_video_section', 'np_full_bleed_video_section_shortcode'); 127. Author-Driven Layout

[author_driven_layout category=”” posts_per_page=”6″ offset=”0″ unique_group=”authordriven1″ title_color=”#111″ padding=”35″ custom_class=””]
function np_author_driven_layout_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'authordriven1',
'title_color' => '#111', 'padding' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-author-driven {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-author-card {display:flex;gap:24px;background:#fff;padding:24px;border-radius:14px;box-shadow:0 8px 25px rgba(0,0,0,0.1);}
.np-author-avatar {width:82px;height:82px;border-radius:50%;flex-shrink:0;}
.np-author-info {flex:1;}
.np-author-name {font-size:1.3rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-author-driven <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-author-card">
<?php echo get_avatar(get_the_author_meta('ID'), 82); ?>
<div class="np-author-info">
<div class="np-author-name"><?php the_author(); ?></div>
<h3><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('author_driven_layout', 'np_author_driven_layout_shortcode'); 128. Data-Driven Infographic Mix

[data_driven_infographic_mix category=”” posts_per_page=”4″ offset=”0″ unique_group=”infomix1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_data_driven_infographic_mix_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'infomix1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-infographic-mix {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:30px;}
.np-info-card {background:#fff;padding:28px;border-radius:14px;box-shadow:0 12px 35px rgba(0,0,0,0.12);text-align:center;}
.np-info-bar {height:220px;background:linear-gradient(#c8102e,#ff8c00);margin:20px auto;width:80%;border-radius:12px;position:relative;}
.np-info-title {font-size:1.35rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-infographic-mix <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-info-card">
<div class="np-info-bar"></div>
<h3 class="np-info-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('data_driven_infographic_mix', 'np_data_driven_infographic_mix_shortcode'); 129. Sticky Floating Share

[sticky_floating_share category=”” posts_per_page=”1″ offset=”0″ unique_group=”floatingshare1″ title_color=”#111″ padding=”0″ custom_class=””]
function np_sticky_floating_share_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'floatingshare1',
'title_color' => '#111', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-floating-share {position:fixed;bottom:40px;right:40px;background:#fff;border-radius:50px;padding:12px 8px;box-shadow:0 10px 40px rgba(0,0,0,0.25);z-index:9999;display:flex;flex-direction:column;gap:12px;}
.np-share-btn {width:52px;height:52px;background:#c8102e;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:22px;transition:all .3s;}
.np-share-btn:hover {transform:scale(1.2);}
</style>
<div class="np-floating-share <?php echo esc_attr($atts['custom_class']); ?>">
<a href="#" class="np-share-btn">📘</a>
<a href="#" class="np-share-btn">𝕏</a>
<a href="#" class="np-share-btn">🔗</a>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('sticky_floating_share', 'np_sticky_floating_share_shortcode'); 130. Multi-Tabbed Dashboard

[multi_tabbed_dashboard category=”” posts_per_page=”6″ offset=”0″ unique_group=”tabdashboard1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_multi_tabbed_dashboard_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'tabdashboard1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-tab-dashboard {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-tab-buttons {display:flex;gap:8px;border-bottom:3px solid #eee;margin-bottom:24px;}
.np-tab-btn {padding:12px 28px;border-radius:8px 8px 0 0;font-weight:600;cursor:pointer;}
.np-tab-btn.active {background:#c8102e;color:#fff;}
.np-tab-content {display:none;}
.np-tab-content.active {display:block;}
.np-tab-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px;}
.np-tab-card {background:#fff;border-radius:12px;padding:18px;box-shadow:0 6px 20px rgba(0,0,0,0.1);}
.np-tab-title {font-size:1.2rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-tab-dashboard <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-tab-buttons">
<div class="np-tab-btn active" onclick="switchTab(0,'<?php echo esc_attr($atts['unique_group']); ?>')">Latest</div>
<div class="np-tab-btn" onclick="switchTab(1,'<?php echo esc_attr($atts['unique_group']); ?>')">Trending</div>
</div>
<div id="tab0_<?php echo esc_attr($atts['unique_group']); ?>" class="np-tab-content active">
<div class="np-tab-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-tab-card">
<h3 class="np-tab-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
</div>
<div id="tab1_<?php echo esc_attr($atts['unique_group']); ?>" class="np-tab-content">
<p style="text-align:center;padding:60px 20px;color:#888;">Trending content would load here (AJAX ready)</p>
</div>
</div>
<script>
function switchTab(n,group){document.querySelectorAll('.np-tab-content').forEach(c=>c.classList.remove('active'));document.getElementById('tab'+n+'_'+group).classList.add('active');document.querySelectorAll('.np-tab-btn').forEach(b=>b.classList.remove('active'));document.querySelectorAll('.np-tab-btn')[n].classList.add('active');}
</script>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('multi_tabbed_dashboard', 'np_multi_tabbed_dashboard_shortcode'); 131. Immersive Story Scroll

[immersive_story_scroll category=”” posts_per_page=”4″ offset=”0″ unique_group=”immersivescroll1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_immersive_story_scroll_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'immersivescroll1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-immersive-scroll {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-immersive-slide {height:100vh;position:relative;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;color:#fff;overflow:hidden;}
.np-immersive-slide::before {content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(200,16,46,0.75));}
.np-immersive-content {position:relative;z-index:2;max-width:960px;padding:0 40px;text-align:center;}
.np-immersive-title {font-size:clamp(3rem,8vw,6rem);line-height:1.05;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-immersive-scroll <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-immersive-slide" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url(null,'full')); ?>');">
<div class="np-immersive-content">
<h1 class="np-immersive-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h1>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('immersive_story_scroll', 'np_immersive_story_scroll_shortcode'); 132. Minimal Icon List

[minimal_icon_list category=”” posts_per_page=”8″ offset=”0″ unique_group=”iconlist1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_minimal_icon_list_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'iconlist1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-icon-list {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-icon-item {display:flex;gap:22px;align-items:flex-start;padding:18px 0;border-bottom:1px solid #f0f0f0;}
.np-icon-item:last-child {border-bottom:none;}
.np-icon-dot {width:42px;height:42px;background:#c8102e;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0;}
.np-icon-title {font-size:1.22rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-icon-list <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-icon-item">
<div class="np-icon-dot">→</div>
<h3 class="np-icon-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('minimal_icon_list', 'np_minimal_icon_list_shortcode'); 133. Split Background Color

[split_background_color category=”” posts_per_page=”6″ offset=”0″ unique_group=”splitbg1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_split_background_color_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'splitbg1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-split-bg {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:grid;grid-template-columns:1fr 1fr;gap:0;}
.np-split-left {background:#fff;padding:50px 40px;}
.np-split-right {background:#c8102e;color:#fff;padding:50px 40px;}
.np-split-card {background:#fff;border-radius:12px;padding:24px;margin-bottom:24px;box-shadow:0 8px 25px rgba(0,0,0,0.1);}
.np-split-title {font-size:1.3rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-split-bg {grid-template-columns:1fr;}}
</style>
<div class="np-split-bg <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-split-left">
<?php if ($query->have_posts()) : $query->the_post(); ?>
<div class="np-split-card">
<h3 class="np-split-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endif; ?>
</div>
<div class="np-split-right">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-split-card" style="color:#111;">
<h3 class="np-split-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('split_background_color', 'np_split_background_color_shortcode'); 134. Infinite Scroll Feed

[infinite_scroll_feed category=”” posts_per_page=”6″ offset=”0″ unique_group=”infinitescroll1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_infinite_scroll_feed_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'infinitescroll1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-infinite-feed {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-feed-item {padding:28px 0;border-bottom:1px solid #eee;}
.np-feed-item:last-child {border-bottom:none;}
.np-feed-title {font-size:1.35rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-infinite-feed <?php echo esc_attr($atts['custom_class']); ?>" id="feed_<?php echo esc_attr($atts['unique_group']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-feed-item">
<h3 class="np-feed-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
<script>
// Simple IntersectionObserver demo for infinite scroll (extendable)
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) console.log('Load more triggered for <?php echo esc_js($atts['unique_group']); ?>');
});
});
observer.observe(document.getElementById('feed_<?php echo esc_attr($atts['unique_group']); ?>'));
</script>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('infinite_scroll_feed', 'np_infinite_scroll_feed_shortcode'); 135. Zigzag Alternating Layout

[zigzag_alternating_layout category=”” posts_per_page=”6″ offset=”0″ unique_group=”zigzag1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_zigzag_alternating_layout_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'zigzag1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-zigzag {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-zigzag-item {display:flex;gap:40px;margin-bottom:60px;align-items:center;}
.np-zigzag-item:nth-child(even) {flex-direction:row-reverse;}
.np-zigzag-img img {width:48%;height:320px;object-fit:cover;border-radius:16px;}
.np-zigzag-content {width:52%;}
.np-zigzag-title {font-size:1.55rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-zigzag-item {flex-direction:column;gap:24px;} .np-zigzag-img img,.np-zigzag-content {width:100%;}}
</style>
<div class="np-zigzag <?php echo esc_attr($atts['custom_class']); ?>">
<?php $i=0; while($query->have_posts()) : $query->the_post(); $i++; ?>
<div class="np-zigzag-item">
<div class="np-zigzag-img"><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a></div>
<div class="np-zigzag-content">
<h3 class="np-zigzag-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('zigzag_alternating_layout', 'np_zigzag_alternating_layout_shortcode'); 136. Full-Bleed Section Divider

[full_bleed_section_divider category=”” posts_per_page=”3″ offset=”0″ unique_group=”bleeddivider1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_full_bleed_section_divider_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 3, 'offset' => 0, 'unique_group' => 'bleeddivider1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-bleed-divider {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-bleed-item {height:520px;position:relative;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;color:#fff;}
.np-bleed-item::before {content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(200,16,46,0.7));}
.np-bleed-title {font-size:2.8rem;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;z-index:2;}
</style>
<div class="np-bleed-divider <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-bleed-item" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url(null,'full')); ?>');">
<h2 class="np-bleed-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h2>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('full_bleed_section_divider', 'np_full_bleed_section_divider_shortcode'); 137. Tabbed Category Switcher

[tabbed_category_switcher category=”” posts_per_page=”6″ offset=”0″ unique_group=”tabswitch1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_tabbed_category_switcher_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'tabswitch1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-tab-switcher {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-tab-nav {display:flex;gap:12px;margin-bottom:30px;border-bottom:3px solid #eee;}
.np-tab-nav button {padding:14px 32px;border:none;background:#fff;border-radius:8px 8px 0 0;font-weight:600;cursor:pointer;}
.np-tab-nav button.active {background:#c8102e;color:#fff;}
.np-tab-panel {display:none;}
.np-tab-panel.active {display:block;}
.np-tab-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px;}
</style>
<div class="np-tab-switcher <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-tab-nav">
<button class="active" onclick="this.parentNode.parentNode.querySelectorAll('.np-tab-panel').forEach(p=>p.classList.remove('active'));this.parentNode.parentNode.querySelector('#panel1_<?php echo esc_attr($atts['unique_group']); ?>').classList.add('active');">All</button>
<button onclick="this.parentNode.parentNode.querySelectorAll('.np-tab-panel').forEach(p=>p.classList.remove('active'));this.parentNode.parentNode.querySelector('#panel2_<?php echo esc_attr($atts['unique_group']); ?>').classList.add('active');">Category 1</button>
</div>
<div id="panel1_<?php echo esc_attr($atts['unique_group']); ?>" class="np-tab-panel active">
<div class="np-tab-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div><h3 style="color:<?php echo esc_attr($atts['title_color']); ?>;"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3></div>
<?php endwhile; ?>
</div>
</div>
<div id="panel2_<?php echo esc_attr($atts['unique_group']); ?>" class="np-tab-panel">
<p style="padding:80px 20px;text-align:center;color:#777;">Dynamic category content loads here</p>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('tabbed_category_switcher', 'np_tabbed_category_switcher_shortcode'); 138. Two-Column Mixed

[two_column_mixed category=”” posts_per_page=”5″ offset=”0″ unique_group=”twomixed1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_two_column_mixed_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'twomixed1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-two-mixed {display:grid;grid-template-columns:2fr 1fr;gap:40px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-wide-card {border-radius:16px;overflow:hidden;box-shadow:0 12px 35px rgba(0,0,0,0.15);}
.np-wide-card img {width:100%;height:520px;object-fit:cover;}
.np-narrow-list {display:flex;flex-direction:column;gap:28px;}
.np-narrow-item {display:flex;gap:18px;}
.np-narrow-img img {width:110px;height:82px;object-fit:cover;border-radius:8px;}
.np-narrow-title {font-size:1.2rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-two-mixed {grid-template-columns:1fr;}}
</style>
<div class="np-two-mixed <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-wide-card">
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a>
</div>
<div class="np-narrow-list">
<?php for($i=1; $i<count($posts); $i++) : ?>
<div class="np-narrow-item">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'thumbnail'); ?></a>
<h4 class="np-narrow-title"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h4>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('two_column_mixed', 'np_two_column_mixed_shortcode'); 139. Three-Column Balanced

[three_column_balanced category=”” posts_per_page=”9″ offset=”0″ unique_group=”threecol1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_three_column_balanced_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 9, 'offset' => 0, 'unique_group' => 'threecol1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-three-col {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-three-card {background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 6px 20px rgba(0,0,0,0.1);}
.np-three-card img {width:100%;height:200px;object-fit:cover;}
.np-three-body {padding:20px;}
.np-three-title {font-size:1.2rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-three-col <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-three-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-three-body">
<h3 class="np-three-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('three_column_balanced', 'np_three_column_balanced_shortcode'); 140. Asymmetric Hero Split

[asymmetric_hero_split category=”” posts_per_page=”2″ offset=”0″ unique_group=”asymhero1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_asymmetric_hero_split_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 2, 'offset' => 0, 'unique_group' => 'asymhero1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>2,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-asym-split {display:grid;grid-template-columns:2.2fr 1fr;gap:0;min-height:82vh;}
.np-asym-main {position:relative;background-size:cover;background-position:center;}
.np-asym-main::before {content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(200,16,46,0.6));}
.np-asym-side {background:#111;color:#fff;display:flex;flex-direction:column;justify-content:center;padding:60px 50px;gap:40px;}
.np-asym-title {font-size:clamp(2.6rem,6vw,4.5rem);line-height:1.1;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-asym-split {grid-template-columns:1fr;}}
</style>
<div class="np-asym-split <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-asym-main" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($posts[0]->ID,'full')); ?>');">
<div style="position:absolute;bottom:60px;left:60px;right:60px;">
<h1 class="np-asym-title"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h1>
</div>
</div>
<div class="np-asym-side">
<?php if (isset($posts[1])) : ?>
<h2 style="margin:0;"><a href="<?php echo esc_url(get_permalink($posts[1])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[1])); ?></a></h2>
<?php endif; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('asymmetric_hero_split', 'np_asymmetric_hero_split_shortcode'); 141. Weather/Alert Special Block

[weather_alert_special_block category=”” posts_per_page=”1″ offset=”0″ unique_group=”weatheralert1″ title_color=”#ffffff” padding=”40″ custom_class=””]
function np_weather_alert_special_block_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'weatheralert1',
'title_color' => '#ffffff', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-weather-alert {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:linear-gradient(135deg,#c8102e,#ff4d4d);color:#fff;border-radius:16px;position:relative;overflow:hidden;}
.np-weather-alert::before {content:"";position:absolute;top:-50%;right:-30%;width:400px;height:400px;background:rgba(255,255,255,0.15);border-radius:50%;filter:blur(60px);}
.np-alert-content {display:flex;gap:40px;align-items:center;padding:40px 50px;position:relative;z-index:2;}
.np-alert-icon {font-size:5.5rem;flex-shrink:0;}
.np-alert-text h2 {font-size:2.1rem;font-weight:900;line-height:1.2;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:768px) {.np-alert-content {flex-direction:column;gap:20px;text-align:center;}}
</style>
<div class="np-weather-alert <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-alert-content">
<div class="np-alert-icon">⛈️</div>
<div>
<h2 class="np-alert-text"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h2>
<p style="margin-top:12px;opacity:0.95;font-size:1.15rem;">Urgent weather update • Stay safe</p>
</div>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('weather_alert_special_block', 'np_weather_alert_special_block_shortcode'); 142. Sticky Top Navigation + Hero

[sticky_top_navigation_hero category=”” posts_per_page=”1″ offset=”0″ unique_group=”stickyhero1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_sticky_top_navigation_hero_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'stickyhero1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-sticky-nav-hero {position:relative;}
.np-sticky-nav {position:sticky;top:0;background:#111;color:#fff;padding:16px 40px;z-index:100;display:flex;justify-content:space-between;align-items:center;box-shadow:0 4px 15px rgba(0,0,0,0.3);}
.np-sticky-hero {height:82vh;background:url('<?php echo esc_url(get_the_post_thumbnail_url($post->ID,'full')); ?>') center/cover no-repeat;display:flex;align-items:center;justify-content:center;position:relative;}
.np-sticky-hero::before {content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(200,16,46,0.85));}
.np-sticky-hero-title {font-size:clamp(3.2rem,8vw,5.8rem);font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;text-align:center;position:relative;z-index:2;}
</style>
<div class="np-sticky-nav-hero <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-sticky-nav">News Portal • Live Updates</div>
<div class="np-sticky-hero">
<h1 class="np-sticky-hero-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h1>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('sticky_top_navigation_hero', 'np_sticky_top_navigation_hero_shortcode'); 143. Opinion Highlight Block

[opinion_highlight_block category=”” posts_per_page=”3″ offset=”0″ unique_group=”opinionhighlight1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_opinion_highlight_block_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 3, 'offset' => 0, 'unique_group' => 'opinionhighlight1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-opinion-highlight {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-opinion-card {background:#fff;border-left:8px solid #c8102e;padding:32px;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,0.12);margin-bottom:30px;}
.np-opinion-card:last-child {margin-bottom:0;}
.np-opinion-title {font-size:1.45rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin-bottom:16px;}
.np-opinion-author {color:#c8102e;font-weight:600;}
</style>
<div class="np-opinion-highlight <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-opinion-card">
<h3 class="np-opinion-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<div class="np-opinion-author">By <?php the_author(); ?></div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('opinion_highlight_block', 'np_opinion_highlight_block_shortcode'); 144. Video-First Grid

[video_first_grid category=”” posts_per_page=”6″ offset=”0″ unique_group=”videofirst1″ title_color=”#111″ border_radius=”14″ padding=”30″ custom_class=””]
function np_video_first_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'videofirst1',
'title_color' => '#111', 'border_radius' => '14', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-video-first-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-video-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,0.12);position:relative;}
.np-video-card img {width:100%;height:210px;object-fit:cover;}
.np-video-play {position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:66px;height:66px;background:rgba(200,16,46,0.9);border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:28px;}
.np-video-body {padding:20px;}
.np-video-title {font-size:1.25rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-video-first-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-video-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-video-play">▶</div>
<div class="np-video-body">
<h3 class="np-video-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('video_first_grid', 'np_video_first_grid_shortcode'); 145. Compact List View

[compact_list_view category=”” posts_per_page=”8″ offset=”0″ unique_group=”compactlist1″ title_color=”#111″ padding=”25″ custom_class=””]
function np_compact_list_view_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'compactlist1',
'title_color' => '#111', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-compact-list {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-compact-row {display:flex;gap:20px;padding:20px 0;border-bottom:1px solid #f0f0f0;}
.np-compact-row:last-child {border-bottom:none;}
.np-compact-thumb img {width:96px;height:72px;object-fit:cover;border-radius:8px;}
.np-compact-title {font-size:1.22rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-compact-list <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-compact-row">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
<h3 class="np-compact-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('compact_list_view', 'np_compact_list_view_shortcode'); 146. Featured Slider + Grid Below

[featured_slider_grid_below category=”” posts_per_page=”7″ offset=”0″ unique_group=”slidersbelow1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_featured_slider_grid_below_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 7, 'offset' => 0, 'unique_group' => 'slidersbelow1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-slider-grid {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-featured-slider {height:520px;position:relative;border-radius:16px;overflow:hidden;margin-bottom:50px;}
.np-featured-slider img {width:100%;height:100%;object-fit:cover;}
.np-slider-title {position:absolute;bottom:40px;left:40px;color:#fff;font-size:2.4rem;font-weight:900;}
.np-grid-below {display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px;}
.np-grid-card {background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.1);}
</style>
<div class="np-slider-grid <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-featured-slider">
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a>
<div class="np-slider-title"><?php echo esc_html(get_the_title($posts[0])); ?></div>
</div>
<div class="np-grid-below">
<?php for($i=1; $i<count($posts); $i++) : ?>
<div class="np-grid-card">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'medium'); ?></a>
<div style="padding:18px;"><h4 style="color:<?php echo esc_attr($atts['title_color']); ?>;margin:0;"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h4></div>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('featured_slider_grid_below', 'np_featured_slider_grid_below_shortcode'); 147. Dark Mode Overlay Cards

[dark_mode_overlay_cards category=”” posts_per_page=”6″ offset=”0″ unique_group=”darkoverlay1″ title_color=”#ffffff” border_radius=”14″ padding=”30″ custom_class=””]
function np_dark_mode_overlay_cards_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'darkoverlay1',
'title_color' => '#ffffff', 'border_radius' => '14', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-dark-overlay {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:#0a0a0a;}
.np-dark-card {position:relative;height:360px;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;}
.np-dark-card img {width:100%;height:100%;object-fit:cover;filter:brightness(0.75);}
.np-dark-overlay-text {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000);padding:32px;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-dark-title {font-size:1.35rem;font-weight:700;}
</style>
<div class="np-dark-overlay <?php echo esc_attr($atts['custom_class']); ?>">
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px;">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-dark-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-dark-overlay-text">
<h3 class="np-dark-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('dark_mode_overlay_cards', 'np_dark_mode_overlay_cards_shortcode'); 148. Bordered Minimal Cards

[bordered_minimal_cards category=”” posts_per_page=”6″ offset=”0″ unique_group=”borderedmin1″ title_color=”#111″ border_radius=”8″ padding=”35″ custom_class=””]
function np_bordered_minimal_cards_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'borderedmin1',
'title_color' => '#111', 'border_radius' => '8', 'padding' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-bordered-min {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:28px;}
.np-bordered-card {border:2px solid #eee;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;padding:24px;background:#fff;transition:all .3s;}
.np-bordered-card:hover {border-color:#c8102e;transform:translateY(-6px);}
.np-bordered-title {font-size:1.28rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-bordered-min <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-bordered-card">
<h3 class="np-bordered-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('bordered_minimal_cards', 'np_bordered_minimal_cards_shortcode'); 149. Collage-Style Overlap

[collage_style_overlap category=”” posts_per_page=”6″ offset=”0″ unique_group=”collageoverlap1″ title_color=”#ffffff” padding=”40″ custom_class=””]
function np_collage_style_overlap_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'collageoverlap1',
'title_color' => '#ffffff', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-collage-overlap {padding:<?php echo esc_attr($atts['padding']); ?>px 0;position:relative;}
.np-collage-container {display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px;}
.np-collage-item {position:relative;border:10px solid #fff;border-radius:16px;overflow:hidden;box-shadow:0 20px 50px rgba(0,0,0,0.25);transition:transform .4s;}
.np-collage-item:hover {transform:scale(1.08);z-index:10;}
.np-collage-item img {width:100%;height:300px;object-fit:cover;}
.np-collage-label {position:absolute;bottom:20px;left:20px;background:rgba(200,16,46,0.9);color:#fff;padding:8px 20px;border-radius:30px;font-weight:600;}
</style>
<div class="np-collage-overlap <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-collage-container">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-collage-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-collage-label"><?php the_title(); ?></div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('collage_style_overlap', 'np_collage_style_overlap_shortcode'); 150. Hierarchical Importance Grid

[hierarchical_importance_grid category=”” posts_per_page=”7″ offset=”0″ unique_group=”hierarchy1″ title_color=”#111″ padding=”35″ custom_class=””]
function np_hierarchical_importance_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 7, 'offset' => 0, 'unique_group' => 'hierarchy1',
'title_color' => '#111', 'padding' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-hierarchy-grid {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:26px;}
.np-hierarchy-main {grid-column:span 2;grid-row:span 2;background:#fff;border-radius:18px;overflow:hidden;box-shadow:0 15px 45px rgba(200,16,46,0.25);}
.np-hierarchy-main img {width:100%;height:520px;object-fit:cover;}
.np-hierarchy-small {background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.1);}
.np-hierarchy-title {font-size:1.45rem;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;padding:22px;}
</style>
<div class="np-hierarchy-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php if (isset($posts[0])) : ?>
<div class="np-hierarchy-main">
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a>
<h2 class="np-hierarchy-title"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h2>
</div>
<?php endif; ?>
<?php for($i=1; $i<count($posts); $i++) : ?>
<div class="np-hierarchy-small">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'medium'); ?></a>
<h3 class="np-hierarchy-title"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h3>
</div>
<?php endfor; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('hierarchical_importance_grid', 'np_hierarchical_importance_grid_shortcode'); 151. Dual Tab News Section

[dual_tab_news_section posts_per_page=”8″ offset=”0″ unique_group=”dualtab1″ title_color=”#111″ accent_color=”#c8102e” padding=”30″ views_meta_key=”post_views_count” custom_class=””]
function np_dual_tab_news_section_shortcode($atts) {
$atts = shortcode_atts(array(
'posts_per_page' => 8,
'offset' => 0,
'unique_group' => 'dualtab1',
'title_color' => '#111',
'accent_color' => '#c8102e',
'padding' => '30',
'views_meta_key' => 'post_views_count', // Customizable meta key for views
'custom_class' => ''
), $atts);
ob_start(); ?>
<style>
.np-dual-tab-section {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-tab-header {
display: flex;
border-bottom: 3px solid #eee;
margin-bottom: 25px;
}
.np-tab-btn {
padding: 14px 32px;
font-weight: 700;
font-size: 1.1rem;
cursor: pointer;
border: none;
background: transparent;
color: #555;
border-bottom: 3px solid transparent;
transition: all 0.3s;
}
.np-tab-btn.active {
color: #000;
border-bottom: 3px solid <?php echo esc_attr($atts['accent_color']); ?>;
}
.np-tab-content {display: none;}
.np-tab-content.active {display: block;}
.np-news-item {
display: flex;
gap: 18px;
padding: 16px 0;
border-bottom: 1px solid #f0f0f0;
}
.np-news-item:last-child {border-bottom: none;}
.np-news-thumb img {
width: 110px;
height: 82px;
object-fit: cover;
border-radius: 6px;
flex-shrink: 0;
}
.np-news-title {
font-size: 1.15rem;
line-height: 1.45;
font-weight: 700;
color: <?php echo esc_attr($atts['title_color']); ?>;
}
.np-news-title a {color: inherit; text-decoration: none;}
.np-news-title a:hover {color: <?php echo esc_attr($atts['accent_color']); ?>;}
</style>
<div class="np-dual-tab-section <?php echo esc_attr($atts['custom_class']); ?>">
<!-- Tab Header -->
<div class="np-tab-header">
<button class="np-tab-btn active"
onclick="switchNewsTab(0, '<?php echo esc_attr($atts['unique_group']); ?>')">
সর্বশেষ সংবাদ
</button>
<button class="np-tab-btn"
onclick="switchNewsTab(1, '<?php echo esc_attr($atts['unique_group']); ?>')">
সর্বাধিক পঠিত
</button>
</div>
<!-- Recent Posts Tab -->
<div id="tab_recent_<?php echo esc_attr($atts['unique_group']); ?>" class="np-tab-content active">
<?php
$recent_args = array(
'post_type' => 'post',
'posts_per_page' => intval($atts['posts_per_page']),
'offset' => intval($atts['offset']),
'orderby' => 'date',
'order' => 'DESC'
);
$recent_query = new WP_Query($recent_args);
while($recent_query->have_posts()) : $recent_query->the_post(); ?>
<div class="np-news-item">
<div class="np-news-thumb">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
</div>
<h3 class="np-news-title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h3>
</div>
<?php endwhile; wp_reset_postdata(); ?>
</div>
<!-- Popular Posts Tab - Ordered by Custom Meta Key -->
<div id="tab_popular_<?php echo esc_attr($atts['unique_group']); ?>" class="np-tab-content">
<?php
$popular_args = array(
'post_type' => 'post',
'posts_per_page' => intval($atts['posts_per_page']),
'offset' => intval($atts['offset']),
'meta_key' => sanitize_text_field($atts['views_meta_key']),
'orderby' => 'meta_value_num',
'order' => 'DESC'
);
$popular_query = new WP_Query($popular_args);
if ($popular_query->have_posts()) :
while($popular_query->have_posts()) : $popular_query->the_post(); ?>
<div class="np-news-item">
<div class="np-news-thumb">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
</div>
<h3 class="np-news-title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h3>
</div>
<?php endwhile;
else : ?>
<p style="padding:40px 20px; text-align:center; color:#777;">
No posts found with view count data.
</p>
<?php endif; wp_reset_postdata(); ?>
</div>
</div>
<script>
function switchNewsTab(tabIndex, group) {
const contents = document.querySelectorAll('#tab_recent_' + group + ', #tab_popular_' + group);
const buttons = document.querySelectorAll('.np-tab-btn');
contents.forEach(content => content.classList.remove('active'));
buttons.forEach(btn => btn.classList.remove('active'));
contents[tabIndex].classList.add('active');
buttons[tabIndex].classList.add('active');
}
</script>
<?php
return ob_get_clean();
}
add_shortcode('dual_tab_news_section', 'np_dual_tab_news_section_shortcode'); 152. Breaking Hero with Side & Bottom Grid

[breaking_hero_with_side_bottom posts_per_page=”10″ offset=”0″ unique_group=”breakinghero1″ title_color=”#ffffff” accent_color=”#c8102e” padding=”30″ side_posts=”4″ bottom_columns=”4″ hero_scrolling=”no” custom_class=”” ]
function np_breaking_hero_with_side_bottom_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '',
'posts_per_page' => 10,
'offset' => 0,
'unique_group' => 'breakinghero1',
'title_color' => '#ffffff',
'accent_color' => '#c8102e',
'padding' => '30',
'side_posts' => 4, // Number of posts in right sidebar
'bottom_columns' => 4, // Number of columns in bottom grid
'hero_scrolling' => 'no', // 'yes' = auto scroll titles, 'no' = static
'custom_class' => ''
), $atts);
$args = array(
'post_type' => 'post',
'posts_per_page' => intval($atts['posts_per_page']),
'offset' => intval($atts['offset']),
'orderby' => 'date',
'order' => 'DESC'
);
if (!empty($atts['category'])) {
$args['category_name'] = sanitize_text_field($atts['category']);
}
$query = new WP_Query($args);
$posts = $query->posts;
if (empty($posts)) return '';
$hero_post = $posts[0];
$side_start = 1;
$bottom_start = $side_start + intval($atts['side_posts']);
ob_start(); ?>
<style>
.np-breaking-hero-section {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
/* Main Hero */
.np-hero-main {
background: linear-gradient(rgba(0,0,0,0.65), rgba(200,16,46,0.85)),
url('<?php echo esc_url(get_the_post_thumbnail_url($hero_post->ID, 'full')); ?>') center/cover no-repeat;
height: 520px;
border-radius: 12px;
position: relative;
display: flex;
align-items: flex-end;
padding: 50px 40px;
color: <?php echo esc_attr($atts['title_color']); ?>;
margin-bottom: 30px;
overflow: hidden;
}
.np-hero-title {
font-size: 2.4rem;
line-height: 1.3;
font-weight: 900;
max-width: 90%;
}
/* Right Side List */
.np-side-list {
display: flex;
flex-direction: column;
gap: 22px;
}
.np-side-item {
display: flex;
gap: 16px;
}
.np-side-item img {
width: 110px;
height: 82px;
object-fit: cover;
border-radius: 6px;
flex-shrink: 0;
}
.np-side-title {
font-size: 1.08rem;
line-height: 1.45;
font-weight: 700;
color: #111;
}
/* Bottom Grid */
.np-bottom-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 24px;
}
.np-bottom-card {
background: #fff;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
.np-bottom-card img {
width: 100%;
height: 160px;
object-fit: cover;
}
.np-bottom-body {
padding: 16px;
}
.np-bottom-title {
font-size: 1.12rem;
line-height: 1.4;
font-weight: 700;
color: #111;
}
/* Scrolling Effect */
<?php if ($atts['hero_scrolling'] === 'yes') : ?>
.np-hero-title {
animation: titleScroll 25s linear infinite;
white-space: nowrap;
}
@keyframes titleScroll {
0% { transform: translateX(0); }
100% { transform: translateX(-50%); }
}
<?php endif; ?>
</style>
<div class="np-breaking-hero-section <?php echo esc_attr($atts['custom_class']); ?>">
<div style="display: grid; grid-template-columns: 2fr 1fr; gap: 30px;">
<!-- Big Hero Post -->
<div class="np-hero-main">
<h1 class="np-hero-title">
<a href="<?php echo esc_url(get_permalink($hero_post)); ?>" style="color:inherit;">
<?php echo esc_html(get_the_title($hero_post)); ?>
</a>
</h1>
</div>
<!-- Right Side Posts -->
<div class="np-side-list">
<?php
for($i = $side_start; $i < $side_start + intval($atts['side_posts']) && isset($posts[$i]); $i++) : ?>
<div class="np-side-item">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>">
<?php echo get_the_post_thumbnail($posts[$i]->ID, 'thumbnail'); ?>
</a>
<h4 class="np-side-title">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;">
<?php echo esc_html(get_the_title($posts[$i])); ?>
</a>
</h4>
</div>
<?php endfor; ?>
</div>
</div>
<!-- Bottom Grid -->
<div class="np-bottom-grid" style="margin-top: 40px;">
<?php
for($i = $bottom_start; $i < count($posts); $i++) : ?>
<div class="np-bottom-card">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>">
<?php echo get_the_post_thumbnail($posts[$i]->ID, 'medium'); ?>
</a>
<div class="np-bottom-body">
<h3 class="np-bottom-title">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;">
<?php echo esc_html(get_the_title($posts[$i])); ?>
</a>
</h3>
</div>
</div>
<?php endfor; ?>
</div>
</div>
<?php
wp_reset_postdata();
return ob_get_clean();
}
add_shortcode('breaking_hero_with_side_bottom', 'np_breaking_hero_with_side_bottom_shortcode'); 123. Reader Poll Integration

[reader_poll_integration category=”” posts_per_page=”1″ offset=”0″ unique_group=”pollint1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_reader_poll_integration_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'pollint1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-poll-integration {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:#f8f9fa;border-radius:16px;}
.np-poll-header {font-size:1.55rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin-bottom:24px;}
.np-poll-option {background:#fff;padding:18px 24px;margin:12px 0;border-radius:10px;cursor:pointer;border:2px solid #eee;transition:all .3s;}
.np-poll-option:hover {border-color:#c8102e;}
</style>
<div class="np-poll-integration <?php echo esc_attr($atts['custom_class']); ?>">
<h2 class="np-poll-header">Poll: <?php echo esc_html(get_the_title($post)); ?></h2>
<div class="np-poll-option">Yes — Strongly support</div>
<div class="np-poll-option">No — Disagree</div>
<div class="np-poll-option">Maybe — Need more info</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('reader_poll_integration', 'np_reader_poll_integration_shortcode'); 124. Seasonal Color Theme

[seasonal_color_theme category=”” posts_per_page=”6″ offset=”0″ unique_group=”seasonal1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_seasonal_color_theme_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'seasonal1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-seasonal {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:linear-gradient(90deg,#c8102e,#ff8c00);color:#fff;}
.np-seasonal-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:24px;}
.np-seasonal-card {background:rgba(255,255,255,0.95);color:#111;border-radius:14px;padding:20px;box-shadow:0 10px 30px rgba(0,0,0,0.2);}
.np-seasonal-title {font-size:1.3rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-seasonal <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-seasonal-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-seasonal-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<h3 class="np-seasonal-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('seasonal_color_theme', 'np_seasonal_color_theme_shortcode'); 125. Compact Horizontal Mini-Cards

[compact_horizontal_mini_cards category=”” posts_per_page=”8″ offset=”0″ unique_group=”minihorizontal1″ title_color=”#111″ padding=”25″ custom_class=””]
function np_compact_horizontal_mini_cards_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'minihorizontal1',
'title_color' => '#111', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-mini-horizontal {padding:<?php echo esc_attr($atts['padding']); ?>px 0;overflow-x:auto;scrollbar-width:none;}
.np-mini-container {display:flex;gap:16px;width:max-content;}
.np-mini-card {min-width:210px;background:#fff;border-radius:10px;padding:14px;box-shadow:0 6px 18px rgba(0,0,0,0.1);}
.np-mini-card img {width:100%;height:120px;object-fit:cover;border-radius:8px;}
.np-mini-title {font-size:1.05rem;line-height:1.35;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin-top:12px;}
</style>
<div class="np-mini-horizontal <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-mini-container">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-mini-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
<h4 class="np-mini-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h4>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('compact_horizontal_mini_cards', 'np_compact_horizontal_mini_cards_shortcode'); 126. Full-Bleed Video Section

[full_bleed_video_section category=”” posts_per_page=”1″ offset=”0″ unique_group=”fullbleedvideo1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_full_bleed_video_section_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'fullbleedvideo1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-full-bleed-video {height:100vh;position:relative;overflow:hidden;}
.np-full-bleed-video video {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.np-video-content {position:relative;z-index:2;height:100%;display:flex;align-items:center;justify-content:center;text-align:center;padding:0 30px;}
.np-video-title {font-size:clamp(3rem,8vw,6rem);line-height:1.05;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-full-bleed-video <?php echo esc_attr($atts['custom_class']); ?>">
<video autoplay muted loop playsinline>
<source src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4">
</video>
<div class="np-video-content">
<h1 class="np-video-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h1>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('full_bleed_video_section', 'np_full_bleed_video_section_shortcode'); 127. Author-Driven Layout

[author_driven_layout category=”” posts_per_page=”6″ offset=”0″ unique_group=”authordriven1″ title_color=”#111″ padding=”35″ custom_class=””]
function np_author_driven_layout_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'authordriven1',
'title_color' => '#111', 'padding' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-author-driven {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-author-card {display:flex;gap:24px;background:#fff;padding:24px;border-radius:14px;box-shadow:0 8px 25px rgba(0,0,0,0.1);}
.np-author-avatar {width:82px;height:82px;border-radius:50%;flex-shrink:0;}
.np-author-info {flex:1;}
.np-author-name {font-size:1.3rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-author-driven <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-author-card">
<?php echo get_avatar(get_the_author_meta('ID'), 82); ?>
<div class="np-author-info">
<div class="np-author-name"><?php the_author(); ?></div>
<h3><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('author_driven_layout', 'np_author_driven_layout_shortcode'); 128. Data-Driven Infographic Mix

[data_driven_infographic_mix category=”” posts_per_page=”4″ offset=”0″ unique_group=”infomix1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_data_driven_infographic_mix_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'infomix1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-infographic-mix {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:30px;}
.np-info-card {background:#fff;padding:28px;border-radius:14px;box-shadow:0 12px 35px rgba(0,0,0,0.12);text-align:center;}
.np-info-bar {height:220px;background:linear-gradient(#c8102e,#ff8c00);margin:20px auto;width:80%;border-radius:12px;position:relative;}
.np-info-title {font-size:1.35rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-infographic-mix <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-info-card">
<div class="np-info-bar"></div>
<h3 class="np-info-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('data_driven_infographic_mix', 'np_data_driven_infographic_mix_shortcode'); 129. Sticky Floating Share

[sticky_floating_share category=”” posts_per_page=”1″ offset=”0″ unique_group=”floatingshare1″ title_color=”#111″ padding=”0″ custom_class=””]
function np_sticky_floating_share_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'floatingshare1',
'title_color' => '#111', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-floating-share {position:fixed;bottom:40px;right:40px;background:#fff;border-radius:50px;padding:12px 8px;box-shadow:0 10px 40px rgba(0,0,0,0.25);z-index:9999;display:flex;flex-direction:column;gap:12px;}
.np-share-btn {width:52px;height:52px;background:#c8102e;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:22px;transition:all .3s;}
.np-share-btn:hover {transform:scale(1.2);}
</style>
<div class="np-floating-share <?php echo esc_attr($atts['custom_class']); ?>">
<a href="#" class="np-share-btn">📘</a>
<a href="#" class="np-share-btn">𝕏</a>
<a href="#" class="np-share-btn">🔗</a>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('sticky_floating_share', 'np_sticky_floating_share_shortcode'); 130. Multi-Tabbed Dashboard

[multi_tabbed_dashboard category=”” posts_per_page=”6″ offset=”0″ unique_group=”tabdashboard1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_multi_tabbed_dashboard_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'tabdashboard1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-tab-dashboard {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-tab-buttons {display:flex;gap:8px;border-bottom:3px solid #eee;margin-bottom:24px;}
.np-tab-btn {padding:12px 28px;border-radius:8px 8px 0 0;font-weight:600;cursor:pointer;}
.np-tab-btn.active {background:#c8102e;color:#fff;}
.np-tab-content {display:none;}
.np-tab-content.active {display:block;}
.np-tab-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px;}
.np-tab-card {background:#fff;border-radius:12px;padding:18px;box-shadow:0 6px 20px rgba(0,0,0,0.1);}
.np-tab-title {font-size:1.2rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-tab-dashboard <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-tab-buttons">
<div class="np-tab-btn active" onclick="switchTab(0,'<?php echo esc_attr($atts['unique_group']); ?>')">Latest</div>
<div class="np-tab-btn" onclick="switchTab(1,'<?php echo esc_attr($atts['unique_group']); ?>')">Trending</div>
</div>
<div id="tab0_<?php echo esc_attr($atts['unique_group']); ?>" class="np-tab-content active">
<div class="np-tab-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-tab-card">
<h3 class="np-tab-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
</div>
<div id="tab1_<?php echo esc_attr($atts['unique_group']); ?>" class="np-tab-content">
<p style="text-align:center;padding:60px 20px;color:#888;">Trending content would load here (AJAX ready)</p>
</div>
</div>
<script>
function switchTab(n,group){document.querySelectorAll('.np-tab-content').forEach(c=>c.classList.remove('active'));document.getElementById('tab'+n+'_'+group).classList.add('active');document.querySelectorAll('.np-tab-btn').forEach(b=>b.classList.remove('active'));document.querySelectorAll('.np-tab-btn')[n].classList.add('active');}
</script>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('multi_tabbed_dashboard', 'np_multi_tabbed_dashboard_shortcode'); 131. Immersive Story Scroll

[immersive_story_scroll category=”” posts_per_page=”4″ offset=”0″ unique_group=”immersivescroll1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_immersive_story_scroll_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 4, 'offset' => 0, 'unique_group' => 'immersivescroll1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-immersive-scroll {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-immersive-slide {height:100vh;position:relative;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;color:#fff;overflow:hidden;}
.np-immersive-slide::before {content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(200,16,46,0.75));}
.np-immersive-content {position:relative;z-index:2;max-width:960px;padding:0 40px;text-align:center;}
.np-immersive-title {font-size:clamp(3rem,8vw,6rem);line-height:1.05;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-immersive-scroll <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-immersive-slide" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url(null,'full')); ?>');">
<div class="np-immersive-content">
<h1 class="np-immersive-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h1>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('immersive_story_scroll', 'np_immersive_story_scroll_shortcode'); 132. Minimal Icon List

[minimal_icon_list category=”” posts_per_page=”8″ offset=”0″ unique_group=”iconlist1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_minimal_icon_list_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'iconlist1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-icon-list {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-icon-item {display:flex;gap:22px;align-items:flex-start;padding:18px 0;border-bottom:1px solid #f0f0f0;}
.np-icon-item:last-child {border-bottom:none;}
.np-icon-dot {width:42px;height:42px;background:#c8102e;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0;}
.np-icon-title {font-size:1.22rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-icon-list <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-icon-item">
<div class="np-icon-dot">→</div>
<h3 class="np-icon-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('minimal_icon_list', 'np_minimal_icon_list_shortcode'); 133. Split Background Color

[split_background_color category=”” posts_per_page=”6″ offset=”0″ unique_group=”splitbg1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_split_background_color_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'splitbg1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-split-bg {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:grid;grid-template-columns:1fr 1fr;gap:0;}
.np-split-left {background:#fff;padding:50px 40px;}
.np-split-right {background:#c8102e;color:#fff;padding:50px 40px;}
.np-split-card {background:#fff;border-radius:12px;padding:24px;margin-bottom:24px;box-shadow:0 8px 25px rgba(0,0,0,0.1);}
.np-split-title {font-size:1.3rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-split-bg {grid-template-columns:1fr;}}
</style>
<div class="np-split-bg <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-split-left">
<?php if ($query->have_posts()) : $query->the_post(); ?>
<div class="np-split-card">
<h3 class="np-split-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endif; ?>
</div>
<div class="np-split-right">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-split-card" style="color:#111;">
<h3 class="np-split-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('split_background_color', 'np_split_background_color_shortcode'); 134. Infinite Scroll Feed

[infinite_scroll_feed category=”” posts_per_page=”6″ offset=”0″ unique_group=”infinitescroll1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_infinite_scroll_feed_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'infinitescroll1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-infinite-feed {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-feed-item {padding:28px 0;border-bottom:1px solid #eee;}
.np-feed-item:last-child {border-bottom:none;}
.np-feed-title {font-size:1.35rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-infinite-feed <?php echo esc_attr($atts['custom_class']); ?>" id="feed_<?php echo esc_attr($atts['unique_group']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-feed-item">
<h3 class="np-feed-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
<script>
// Simple IntersectionObserver demo for infinite scroll (extendable)
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) console.log('Load more triggered for <?php echo esc_js($atts['unique_group']); ?>');
});
});
observer.observe(document.getElementById('feed_<?php echo esc_attr($atts['unique_group']); ?>'));
</script>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('infinite_scroll_feed', 'np_infinite_scroll_feed_shortcode'); 135. Zigzag Alternating Layout

[zigzag_alternating_layout category=”” posts_per_page=”6″ offset=”0″ unique_group=”zigzag1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_zigzag_alternating_layout_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'zigzag1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-zigzag {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-zigzag-item {display:flex;gap:40px;margin-bottom:60px;align-items:center;}
.np-zigzag-item:nth-child(even) {flex-direction:row-reverse;}
.np-zigzag-img img {width:48%;height:320px;object-fit:cover;border-radius:16px;}
.np-zigzag-content {width:52%;}
.np-zigzag-title {font-size:1.55rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-zigzag-item {flex-direction:column;gap:24px;} .np-zigzag-img img,.np-zigzag-content {width:100%;}}
</style>
<div class="np-zigzag <?php echo esc_attr($atts['custom_class']); ?>">
<?php $i=0; while($query->have_posts()) : $query->the_post(); $i++; ?>
<div class="np-zigzag-item">
<div class="np-zigzag-img"><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a></div>
<div class="np-zigzag-content">
<h3 class="np-zigzag-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('zigzag_alternating_layout', 'np_zigzag_alternating_layout_shortcode'); 136. Full-Bleed Section Divider

[full_bleed_section_divider category=”” posts_per_page=”3″ offset=”0″ unique_group=”bleeddivider1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_full_bleed_section_divider_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 3, 'offset' => 0, 'unique_group' => 'bleeddivider1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-bleed-divider {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-bleed-item {height:520px;position:relative;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;color:#fff;}
.np-bleed-item::before {content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(200,16,46,0.7));}
.np-bleed-title {font-size:2.8rem;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;z-index:2;}
</style>
<div class="np-bleed-divider <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-bleed-item" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url(null,'full')); ?>');">
<h2 class="np-bleed-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h2>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('full_bleed_section_divider', 'np_full_bleed_section_divider_shortcode'); 137. Tabbed Category Switcher

[tabbed_category_switcher category=”” posts_per_page=”6″ offset=”0″ unique_group=”tabswitch1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_tabbed_category_switcher_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'tabswitch1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-tab-switcher {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-tab-nav {display:flex;gap:12px;margin-bottom:30px;border-bottom:3px solid #eee;}
.np-tab-nav button {padding:14px 32px;border:none;background:#fff;border-radius:8px 8px 0 0;font-weight:600;cursor:pointer;}
.np-tab-nav button.active {background:#c8102e;color:#fff;}
.np-tab-panel {display:none;}
.np-tab-panel.active {display:block;}
.np-tab-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px;}
</style>
<div class="np-tab-switcher <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-tab-nav">
<button class="active" onclick="this.parentNode.parentNode.querySelectorAll('.np-tab-panel').forEach(p=>p.classList.remove('active'));this.parentNode.parentNode.querySelector('#panel1_<?php echo esc_attr($atts['unique_group']); ?>').classList.add('active');">All</button>
<button onclick="this.parentNode.parentNode.querySelectorAll('.np-tab-panel').forEach(p=>p.classList.remove('active'));this.parentNode.parentNode.querySelector('#panel2_<?php echo esc_attr($atts['unique_group']); ?>').classList.add('active');">Category 1</button>
</div>
<div id="panel1_<?php echo esc_attr($atts['unique_group']); ?>" class="np-tab-panel active">
<div class="np-tab-grid">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div><h3 style="color:<?php echo esc_attr($atts['title_color']); ?>;"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3></div>
<?php endwhile; ?>
</div>
</div>
<div id="panel2_<?php echo esc_attr($atts['unique_group']); ?>" class="np-tab-panel">
<p style="padding:80px 20px;text-align:center;color:#777;">Dynamic category content loads here</p>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('tabbed_category_switcher', 'np_tabbed_category_switcher_shortcode'); 138. Two-Column Mixed

[two_column_mixed category=”” posts_per_page=”5″ offset=”0″ unique_group=”twomixed1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_two_column_mixed_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 5, 'offset' => 0, 'unique_group' => 'twomixed1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-two-mixed {display:grid;grid-template-columns:2fr 1fr;gap:40px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-wide-card {border-radius:16px;overflow:hidden;box-shadow:0 12px 35px rgba(0,0,0,0.15);}
.np-wide-card img {width:100%;height:520px;object-fit:cover;}
.np-narrow-list {display:flex;flex-direction:column;gap:28px;}
.np-narrow-item {display:flex;gap:18px;}
.np-narrow-img img {width:110px;height:82px;object-fit:cover;border-radius:8px;}
.np-narrow-title {font-size:1.2rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-two-mixed {grid-template-columns:1fr;}}
</style>
<div class="np-two-mixed <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-wide-card">
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a>
</div>
<div class="np-narrow-list">
<?php for($i=1; $i<count($posts); $i++) : ?>
<div class="np-narrow-item">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'thumbnail'); ?></a>
<h4 class="np-narrow-title"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h4>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('two_column_mixed', 'np_two_column_mixed_shortcode'); 139. Three-Column Balanced

[three_column_balanced category=”” posts_per_page=”9″ offset=”0″ unique_group=”threecol1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_three_column_balanced_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 9, 'offset' => 0, 'unique_group' => 'threecol1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-three-col {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-three-card {background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 6px 20px rgba(0,0,0,0.1);}
.np-three-card img {width:100%;height:200px;object-fit:cover;}
.np-three-body {padding:20px;}
.np-three-title {font-size:1.2rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-three-col <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-three-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-three-body">
<h3 class="np-three-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('three_column_balanced', 'np_three_column_balanced_shortcode'); 140. Asymmetric Hero Split

[asymmetric_hero_split category=”” posts_per_page=”2″ offset=”0″ unique_group=”asymhero1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_asymmetric_hero_split_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 2, 'offset' => 0, 'unique_group' => 'asymhero1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>2,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-asym-split {display:grid;grid-template-columns:2.2fr 1fr;gap:0;min-height:82vh;}
.np-asym-main {position:relative;background-size:cover;background-position:center;}
.np-asym-main::before {content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(200,16,46,0.6));}
.np-asym-side {background:#111;color:#fff;display:flex;flex-direction:column;justify-content:center;padding:60px 50px;gap:40px;}
.np-asym-title {font-size:clamp(2.6rem,6vw,4.5rem);line-height:1.1;font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:992px) {.np-asym-split {grid-template-columns:1fr;}}
</style>
<div class="np-asym-split <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-asym-main" style="background-image:url('<?php echo esc_url(get_the_post_thumbnail_url($posts[0]->ID,'full')); ?>');">
<div style="position:absolute;bottom:60px;left:60px;right:60px;">
<h1 class="np-asym-title"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h1>
</div>
</div>
<div class="np-asym-side">
<?php if (isset($posts[1])) : ?>
<h2 style="margin:0;"><a href="<?php echo esc_url(get_permalink($posts[1])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[1])); ?></a></h2>
<?php endif; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('asymmetric_hero_split', 'np_asymmetric_hero_split_shortcode'); 141. Weather/Alert Special Block

[weather_alert_special_block category=”” posts_per_page=”1″ offset=”0″ unique_group=”weatheralert1″ title_color=”#ffffff” padding=”40″ custom_class=””]
function np_weather_alert_special_block_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'weatheralert1',
'title_color' => '#ffffff', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-weather-alert {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:linear-gradient(135deg,#c8102e,#ff4d4d);color:#fff;border-radius:16px;position:relative;overflow:hidden;}
.np-weather-alert::before {content:"";position:absolute;top:-50%;right:-30%;width:400px;height:400px;background:rgba(255,255,255,0.15);border-radius:50%;filter:blur(60px);}
.np-alert-content {display:flex;gap:40px;align-items:center;padding:40px 50px;position:relative;z-index:2;}
.np-alert-icon {font-size:5.5rem;flex-shrink:0;}
.np-alert-text h2 {font-size:2.1rem;font-weight:900;line-height:1.2;color:<?php echo esc_attr($atts['title_color']); ?>;}
@media (max-width:768px) {.np-alert-content {flex-direction:column;gap:20px;text-align:center;}}
</style>
<div class="np-weather-alert <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-alert-content">
<div class="np-alert-icon">⛈️</div>
<div>
<h2 class="np-alert-text"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h2>
<p style="margin-top:12px;opacity:0.95;font-size:1.15rem;">Urgent weather update • Stay safe</p>
</div>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('weather_alert_special_block', 'np_weather_alert_special_block_shortcode'); 142. Sticky Top Navigation + Hero

[sticky_top_navigation_hero category=”” posts_per_page=”1″ offset=”0″ unique_group=”stickyhero1″ title_color=”#ffffff” padding=”0″ custom_class=””]
function np_sticky_top_navigation_hero_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 1, 'offset' => 0, 'unique_group' => 'stickyhero1',
'title_color' => '#ffffff', 'padding' => '0', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>1,'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
if (!$query->have_posts()) return '';
$post = $query->posts[0];
ob_start(); ?>
<style>
.np-sticky-nav-hero {position:relative;}
.np-sticky-nav {position:sticky;top:0;background:#111;color:#fff;padding:16px 40px;z-index:100;display:flex;justify-content:space-between;align-items:center;box-shadow:0 4px 15px rgba(0,0,0,0.3);}
.np-sticky-hero {height:82vh;background:url('<?php echo esc_url(get_the_post_thumbnail_url($post->ID,'full')); ?>') center/cover no-repeat;display:flex;align-items:center;justify-content:center;position:relative;}
.np-sticky-hero::before {content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(200,16,46,0.85));}
.np-sticky-hero-title {font-size:clamp(3.2rem,8vw,5.8rem);font-weight:900;color:<?php echo esc_attr($atts['title_color']); ?>;text-align:center;position:relative;z-index:2;}
</style>
<div class="np-sticky-nav-hero <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-sticky-nav">News Portal • Live Updates</div>
<div class="np-sticky-hero">
<h1 class="np-sticky-hero-title"><a href="<?php echo esc_url(get_permalink($post)); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($post)); ?></a></h1>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('sticky_top_navigation_hero', 'np_sticky_top_navigation_hero_shortcode'); 143. Opinion Highlight Block

[opinion_highlight_block category=”” posts_per_page=”3″ offset=”0″ unique_group=”opinionhighlight1″ title_color=”#111″ padding=”40″ custom_class=””]
function np_opinion_highlight_block_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 3, 'offset' => 0, 'unique_group' => 'opinionhighlight1',
'title_color' => '#111', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-opinion-highlight {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-opinion-card {background:#fff;border-left:8px solid #c8102e;padding:32px;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,0.12);margin-bottom:30px;}
.np-opinion-card:last-child {margin-bottom:0;}
.np-opinion-title {font-size:1.45rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;margin-bottom:16px;}
.np-opinion-author {color:#c8102e;font-weight:600;}
</style>
<div class="np-opinion-highlight <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-opinion-card">
<h3 class="np-opinion-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
<div class="np-opinion-author">By <?php the_author(); ?></div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('opinion_highlight_block', 'np_opinion_highlight_block_shortcode'); 144. Video-First Grid

[video_first_grid category=”” posts_per_page=”6″ offset=”0″ unique_group=”videofirst1″ title_color=”#111″ border_radius=”14″ padding=”30″ custom_class=””]
function np_video_first_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'videofirst1',
'title_color' => '#111', 'border_radius' => '14', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-video-first-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:26px;padding:<?php echo esc_attr($atts['padding']); ?>px;}
.np-video-card {background:#fff;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,0.12);position:relative;}
.np-video-card img {width:100%;height:210px;object-fit:cover;}
.np-video-play {position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:66px;height:66px;background:rgba(200,16,46,0.9);border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:28px;}
.np-video-body {padding:20px;}
.np-video-title {font-size:1.25rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-video-first-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-video-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a>
<div class="np-video-play">▶</div>
<div class="np-video-body">
<h3 class="np-video-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('video_first_grid', 'np_video_first_grid_shortcode'); 145. Compact List View

[compact_list_view category=”” posts_per_page=”8″ offset=”0″ unique_group=”compactlist1″ title_color=”#111″ padding=”25″ custom_class=””]
function np_compact_list_view_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 8, 'offset' => 0, 'unique_group' => 'compactlist1',
'title_color' => '#111', 'padding' => '25', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-compact-list {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-compact-row {display:flex;gap:20px;padding:20px 0;border-bottom:1px solid #f0f0f0;}
.np-compact-row:last-child {border-bottom:none;}
.np-compact-thumb img {width:96px;height:72px;object-fit:cover;border-radius:8px;}
.np-compact-title {font-size:1.22rem;line-height:1.4;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-compact-list <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-compact-row">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
<h3 class="np-compact-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('compact_list_view', 'np_compact_list_view_shortcode'); 146. Featured Slider + Grid Below

[featured_slider_grid_below category=”” posts_per_page=”7″ offset=”0″ unique_group=”slidersbelow1″ title_color=”#111″ padding=”30″ custom_class=””]
function np_featured_slider_grid_below_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 7, 'offset' => 0, 'unique_group' => 'slidersbelow1',
'title_color' => '#111', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-slider-grid {padding:<?php echo esc_attr($atts['padding']); ?>px 0;}
.np-featured-slider {height:520px;position:relative;border-radius:16px;overflow:hidden;margin-bottom:50px;}
.np-featured-slider img {width:100%;height:100%;object-fit:cover;}
.np-slider-title {position:absolute;bottom:40px;left:40px;color:#fff;font-size:2.4rem;font-weight:900;}
.np-grid-below {display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px;}
.np-grid-card {background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.1);}
</style>
<div class="np-slider-grid <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-featured-slider">
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a>
<div class="np-slider-title"><?php echo esc_html(get_the_title($posts[0])); ?></div>
</div>
<div class="np-grid-below">
<?php for($i=1; $i<count($posts); $i++) : ?>
<div class="np-grid-card">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'medium'); ?></a>
<div style="padding:18px;"><h4 style="color:<?php echo esc_attr($atts['title_color']); ?>;margin:0;"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h4></div>
</div>
<?php endfor; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('featured_slider_grid_below', 'np_featured_slider_grid_below_shortcode'); 147. Dark Mode Overlay Cards

[dark_mode_overlay_cards category=”” posts_per_page=”6″ offset=”0″ unique_group=”darkoverlay1″ title_color=”#ffffff” border_radius=”14″ padding=”30″ custom_class=””]
function np_dark_mode_overlay_cards_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'darkoverlay1',
'title_color' => '#ffffff', 'border_radius' => '14', 'padding' => '30', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-dark-overlay {padding:<?php echo esc_attr($atts['padding']); ?>px 0;background:#0a0a0a;}
.np-dark-card {position:relative;height:360px;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;overflow:hidden;}
.np-dark-card img {width:100%;height:100%;object-fit:cover;filter:brightness(0.75);}
.np-dark-overlay-text {position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#000);padding:32px;color:<?php echo esc_attr($atts['title_color']); ?>;}
.np-dark-title {font-size:1.35rem;font-weight:700;}
</style>
<div class="np-dark-overlay <?php echo esc_attr($atts['custom_class']); ?>">
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px;">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-dark-card">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-dark-overlay-text">
<h3 class="np-dark-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('dark_mode_overlay_cards', 'np_dark_mode_overlay_cards_shortcode'); 148. Bordered Minimal Cards

[bordered_minimal_cards category=”” posts_per_page=”6″ offset=”0″ unique_group=”borderedmin1″ title_color=”#111″ border_radius=”8″ padding=”35″ custom_class=””]
function np_bordered_minimal_cards_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'borderedmin1',
'title_color' => '#111', 'border_radius' => '8', 'padding' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-bordered-min {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:28px;}
.np-bordered-card {border:2px solid #eee;border-radius:<?php echo esc_attr($atts['border_radius']); ?>px;padding:24px;background:#fff;transition:all .3s;}
.np-bordered-card:hover {border-color:#c8102e;transform:translateY(-6px);}
.np-bordered-title {font-size:1.28rem;font-weight:700;color:<?php echo esc_attr($atts['title_color']); ?>;}
</style>
<div class="np-bordered-min <?php echo esc_attr($atts['custom_class']); ?>">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-bordered-card">
<h3 class="np-bordered-title"><a href="<?php the_permalink(); ?>" style="color:inherit;"><?php the_title(); ?></a></h3>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('bordered_minimal_cards', 'np_bordered_minimal_cards_shortcode'); 149. Collage-Style Overlap

[collage_style_overlap category=”” posts_per_page=”6″ offset=”0″ unique_group=”collageoverlap1″ title_color=”#ffffff” padding=”40″ custom_class=””]
function np_collage_style_overlap_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 6, 'offset' => 0, 'unique_group' => 'collageoverlap1',
'title_color' => '#ffffff', 'padding' => '40', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
ob_start(); ?>
<style>
.np-collage-overlap {padding:<?php echo esc_attr($atts['padding']); ?>px 0;position:relative;}
.np-collage-container {display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px;}
.np-collage-item {position:relative;border:10px solid #fff;border-radius:16px;overflow:hidden;box-shadow:0 20px 50px rgba(0,0,0,0.25);transition:transform .4s;}
.np-collage-item:hover {transform:scale(1.08);z-index:10;}
.np-collage-item img {width:100%;height:300px;object-fit:cover;}
.np-collage-label {position:absolute;bottom:20px;left:20px;background:rgba(200,16,46,0.9);color:#fff;padding:8px 20px;border-radius:30px;font-weight:600;}
</style>
<div class="np-collage-overlap <?php echo esc_attr($atts['custom_class']); ?>">
<div class="np-collage-container">
<?php while($query->have_posts()) : $query->the_post(); ?>
<div class="np-collage-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('large'); ?></a>
<div class="np-collage-label"><?php the_title(); ?></div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('collage_style_overlap', 'np_collage_style_overlap_shortcode'); 150. Hierarchical Importance Grid

[hierarchical_importance_grid category=”” posts_per_page=”7″ offset=”0″ unique_group=”hierarchy1″ title_color=”#111″ padding=”35″ custom_class=””]
function np_hierarchical_importance_grid_shortcode($atts) {
$atts = shortcode_atts(array(
'category' => '', 'posts_per_page' => 7, 'offset' => 0, 'unique_group' => 'hierarchy1',
'title_color' => '#111', 'padding' => '35', 'custom_class' => ''
), $atts);
$args = array('post_type'=>'post','posts_per_page'=>intval($atts['posts_per_page']),'offset'=>intval($atts['offset']),'orderby'=>'date','order'=>'DESC');
if (!empty($atts['category'])) $args['category_name'] = sanitize_text_field($atts['category']);
$query = new WP_Query($args);
$posts = $query->posts;
ob_start(); ?>
<style>
.np-hierarchy-grid {padding:<?php echo esc_attr($atts['padding']); ?>px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:26px;}
.np-hierarchy-main {grid-column:span 2;grid-row:span 2;background:#fff;border-radius:18px;overflow:hidden;box-shadow:0 15px 45px rgba(200,16,46,0.25);}
.np-hierarchy-main img {width:100%;height:520px;object-fit:cover;}
.np-hierarchy-small {background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 8px 25px rgba(0,0,0,0.1);}
.np-hierarchy-title {font-size:1.45rem;font-weight:800;color:<?php echo esc_attr($atts['title_color']); ?>;padding:22px;}
</style>
<div class="np-hierarchy-grid <?php echo esc_attr($atts['custom_class']); ?>">
<?php if (isset($posts[0])) : ?>
<div class="np-hierarchy-main">
<a href="<?php echo esc_url(get_permalink($posts[0])); ?>"><?php echo get_the_post_thumbnail($posts[0]->ID, 'large'); ?></a>
<h2 class="np-hierarchy-title"><a href="<?php echo esc_url(get_permalink($posts[0])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[0])); ?></a></h2>
</div>
<?php endif; ?>
<?php for($i=1; $i<count($posts); $i++) : ?>
<div class="np-hierarchy-small">
<a href="<?php echo esc_url(get_permalink($posts[$i])); ?>"><?php echo get_the_post_thumbnail($posts[$i]->ID, 'medium'); ?></a>
<h3 class="np-hierarchy-title"><a href="<?php echo esc_url(get_permalink($posts[$i])); ?>" style="color:inherit;"><?php echo esc_html(get_the_title($posts[$i])); ?></a></h3>
</div>
<?php endfor; ?>
</div>
<?php wp_reset_postdata(); return ob_get_clean();
}
add_shortcode('hierarchical_importance_grid', 'np_hierarchical_importance_grid_shortcode'); Add any of the following shortcode support attribute options to any of the 100+ shortcode templates.
📰 Content Filtering Attributes
category – Category slug or ID
category__in – Include specific categories
category__not_in – Exclude categories
tag – Tag slug
tag_id – Tag ID
tag__in – Include specific tags
tag__not_in – Exclude tags
taxonomy – Custom taxonomy
term – Taxonomy term
post_type – post, page, custom post type
post__in – Include specific posts
post__not_in – Exclude posts
🔢 Post Quantity & Pagination
num – Number of posts
posts_per_page – Posts per page
offset – Skip posts
paged – Pagination page number
ignore_sticky_posts – true/false
📊 Ordering & Sorting
orderby – date, title, ID, rand, comment_count, menu_order
order – ASC / DESC
meta_key – Custom field key
meta_value – Custom field value
meta_compare – =, !=, >, <, LIKE
🖼 Display Control
show_title – true/false
show_excerpt – true/false
show_thumbnail – true/false
show_meta – true/false
show_author – true/false
show_date – true/false
show_category – true/false
show_comment_count – true/false
✂ Content Formatting
excerpt_length – Number of words
title_length – Limit title characters
image_size – thumbnail, medium, large, full
image_width – Custom width
image_height – Custom height
🎨 Layout & Design
layout – grid, list, slider, ticker
columns – Number of columns
gap – Space between items
class – Custom CSS class
id – Custom HTML ID
animation – fade, slide, zoom
⚡ Special News Options
featured – Show featured posts
trending – Based on comments/views
breaking – Breaking news ticker
sticky – Only sticky posts
🔍 Date Filtering
year
monthnum
day
date_query – Custom date range
