by Vinod Sebastian on WordPress.org
Easily inject HTML, CSS, JS, styles, scripts & tracking code via hooks / shortcodes with safe mode, scheduling, revisioning & geotargeting.

Block List
Easily inject HTML, CSS, JS, styles, scripts & tracking code via hooks / shortcodes with safe mode, scheduling, revisioning & geotargeting.
Define start and end dates so snippets appear only when needed — ideal for campaigns, seasonal banners, or compliance notices.
Inject HTML, JavaScript, or CSS styles into any WordPress hook — Classic or Block Hook — without editing templates. Embed blocks directly inside posts, pages, or widgets using shortcodes.
Control visibility across WordPress sections: all, frontend, posts, pages, backend (Admin), authentication, and system pages. Apply filters to selected posts or pages for complete flexibility.
Use geotargeting to display blocks only to visitors from selected countries. Configure rules to include or exclude specific regions.
Administrators can use Raw Mode (unfiltered output) or Safe Mode (sanitized injection). Non-admins can be granted limited Safe Mode access via the wpsc_admin capability, making delegation secure.
Retrieve, compare, and restore block editor content with full revision management. Delete outdated revisions safely to keep the database clean and audit-friendly.
Includes a built-in editor with dedicated sections for HTML, CSS, and JavaScript, plus Preview and Error panels. Syntax highlighting improves readability, while instant error feedback ensures safe workflows.
By combining scheduling, hook targeting, filtering, geotargeting, role-based permissions, revisioning, and a syntax-highlighted editor, WP Smart Content ensures snippets are placed exactly where and when you want them — managed safely by the right people. It’s a compliance-ready, SEO-friendly solution that keeps your WordPress site secure, scalable, and easy to maintain. Supports Classic & Block Hooks, grouped dropdowns, translation readiness, and a reviewer-friendly modular codebase with clear documentation.
Administrators have access to both Raw and Safe modes. Trusted non-administrators can be granted access to pre-created blocks in Safe mode by assigning the ‘wpsc_admin’ capability to their role, either through a role editor plugin or via custom code.
[wp_smart_content name="blockname"] WP Smart Content provides geotargeting support using two options:
Default (Country.is API)
Fallback / Advanced (MaxMind GeoLite2 Database)
Steps to enable MaxMind fallback:
Result:
– By default, WP Smart Content uses Country.is for geotargeting.
– If the MaxMind database is present at the path above, the plugin will use it instead, allowing local IP lookups and more control over data storage.
– If both methods fail, WP Smart Content defaults to rendering content to avoid breaking site functionality.
This plugin bundles the following third-party libraries:
Tagify (https://github.com/yairEO/tagify)
Released under the MIT License
Copyright (c) Panayiotis Lipiridis
Flag Icons (https://github.com/lipis/flag-icons)
Released under the MIT License
Copyright (c) Panayiotis Lipiridis
MaxMind DB Reader (https://github.com/maxmind/MaxMind-DB-Reader-php)
Released under the Apache License, Version 2.0
Copyright (c) MaxMind, Inc.
Used to read GeoLite2 databases for geotargeting support.
GeoLite2 data created by MaxMind, available from https://www.maxmind.com.