WP Manifestindependent plugin directory
manifest / content / featured-image-filter

Featured Image Only Filter releases

WordPress plugin to show only posts with featured images on Homepage, Category pages and Blog pages. Auto-hides empty category sections.

by CodeStackLab · github.com/codestacklab/featured-image-filter · website

0stars
2release downloads
0forks

Install

The author publishes release zips, so WP-CLI can install straight from GitHub:

wp plugin install https://github.com/codestacklab/featured-image-filter/releases/download/v2.1.0/featured-image-filter.zip

Readme

Featured Image Only Filter — WordPress Plugin

Automatically hides posts WITHOUT a featured image from Homepage, Category pages, Blog pages, and all archive pages. Auto-hides empty category sections. Works with ALL WordPress themes.


🚀 Features

  • 🏠 Homepage & Blog Index — Show only image-rich posts on your front page
  • 📂 Category Pages — Keep category archives clean and visual
  • 🔗 Homepage Category Blocks — Also filters theme homepage grids & widgets (SmartMag, Newspaper, etc.)
  • 🙈 Auto-Hide Empty Sections — If a category block becomes empty, the whole section disappears cleanly
  • 🏷️ Tag / Author / Search / Date Archives — Optional filtering for all archive types
  • Performance — Filtering at DB query level — zero overhead
  • 🎨 Theme Agnostic — Works with ANY WordPress theme

📦 Supported Themes

Theme Supported
SmartMag
Newspaper
Jannah
Astra
GeneratePress
OceanWP
Kadence
Divi
Elementor Hello
Any other theme

🔧 Installation

  1. Download the plugin ZIP or clone this repository
  2. Upload the featured-image-filter folder to /wp-content/plugins/
  3. Activate the plugin from WordPress Admin → Plugins
  4. Go to Settings → Featured Image Filter and configure your preferences

⚙️ Settings

Navigate to Settings → Featured Image Filter in your WordPress dashboard.

Page-Level Filters

Option Default Description
Homepage / Blog Index ✅ ON Filters the main front page and posts index
Category Pages ✅ ON Filters all category archive pages
Tag Pages ❌ OFF Filters tag archive pages
Author Pages ❌ OFF Filters author archive pages
Search Results ❌ OFF Filters search result listings
Date Archives ❌ OFF Filters date-based archive pages

Advanced Options

Option Default Description
Filter Homepage Category Blocks ✅ ON Filters sub-queries in theme homepage blocks
Auto-Hide Empty Category Sections ✅ ON Hides entire section if no posts have featured images

💡 How It Works

Posts WITH featured image    →  ✅ Shown normally
Posts WITHOUT featured image →  ❌ Hidden from selected pages
Empty category sections      →  🙈 Auto-hidden (smooth fade animation)
Single post/page views       →  ✅ Not affected

The plugin uses two strategies:

  1. pre_get_posts hook — Modifies the main WordPress query to add a meta_query requiring _thumbnail_id to exist.
  2. posts_where + posts_join SQL hooks — Filters sub-queries (theme blocks/widgets) at the SQL level.
  3. Inline JavaScript DOM scanner — After page load, detects empty section containers and smoothly hides them.

📁 File Structure

featured-image-filter/
├── featured-image-filter.php   ← Main plugin file
├── assets/
│   └── css/
│       └── admin.css           ← Beautiful admin panel styles
└── readme.txt                  ← WordPress plugin readme

🛡️ Security

  • All user inputs are sanitized before saving
  • Uses current_user_can('manage_options') for admin access control
  • No external API calls
  • ABSPATH check prevents direct file access

📝 Changelog

v2.0.0

  • ✨ NEW: Filter homepage category blocks (sub-queries / theme widgets)
  • ✨ NEW: Auto-hide empty category sections with smooth animation
  • ✨ NEW: Advanced settings card in admin panel
  • ✨ NEW: Works with SmartMag, Newspaper, Jannah homepage blocks

v1.0.0

  • 🎉 Initial release
  • Filter support for: Homepage, Blog Index, Categories, Tags, Authors, Search, Date Archives
  • Beautiful admin settings page with toggle switches

📄 License

GPL v2 or later — see LICENSE


Made with ❤️ by CodeStackLab

Read the full README on GitHub →

Releases

TagPublishedAssetDownloads
v2.1.0 Jul 23, 2026 featured-image-filter.zip 0
v2.0.0 Jul 23, 2026 featured-image-filter.zip 2