WP Smart Content

Àpèjúwe

WP Smart Content is the easiest way to inject scripts, styles, and HTML into WordPress headers, footers, and block hooks — all without editing theme files. Whether you need to add tracking code, custom CSS, JavaScript snippets, or marketing tags, this plugin gives you a safe, central dashboard to manage reusable content blocks.

Each block can be named, stored in the WordPress database, and targeted to specific posts, pages, or globally across your site. With support for both Classic Hooks and the new WordPress 6.8 Block Hooks, WP Smart Content is future‑proof and flexible.

Behind the scenes, WP Smart Content works by injecting your HTML, JavaScript, or CSS styles into the selected WordPress hook — whether a classic theme hook or a Block Hook — ensuring your content appears exactly at the chosen placeholder without modifying template files.

✨ Key Features

  • Classic Hooks support: Add content to ‘wp_head’, ‘wp_footer’, ‘wp_print_styles’, ‘wp_print_scripts’, ‘wp_meta’, and ‘wp_print_footer_scripts’.
  • Block Hooks support (WordPress 6.8+): Inject content before/after post content, comments, or entry titles.
  • Grouped dropdowns: Clear separation between Classic Hooks and Block Hooks in the admin UI.
  • Global targeting: Apply blocks to all content types, not just posts/pages.
  • Safe/Raw Mode toggle: Admins can enable Raw Mode for advanced HTML/JS injection while restricting to Safe Mode if unsure.
  • Translation ready: Updated ‘.pot’ file with all new strings.
  • Reviewer friendly architecture: Modularized code, clear documentation, and compliance with WordPress coding standards.

💡 Use Cases

  • Add a script to the ‘<head>’ section.
  • Insert HTML into the ‘<footer>’.
  • Push CSS before WordPress outputs styles.
  • Inject a notice after post content using Block Hooks.
  • Manage marketing tags without editing theme files.

🔗 Supported Hooks

Classic Hooks
* wp_head – Injects content into the ‘<head>’ section before closing tag
* wp_footer – Injects content into the ‘<body>’ section before closing tag
* wp_print_styles – Injects content before WordPress outputs enqueued styles
* wp_print_scripts – Injects content before WordPress outputs enqueued scripts
* wp_meta – Injects content into the meta section of the sidebar
* wp_print_footer_scripts – Injects content before WordPress outputs footer scripts

Block Hooks (WordPress 6.8+)
* after_post_content – Injects content immediately after the post content block
* before_post_content – Injects content immediately before the post content block
* after_comments – Injects content after the comments block
* before_comments – Injects content before the comments block
* after_entry_title – Injects content after the entry/post title block
* before_entry_title – Injects content before the entry/post title block

Optional Context Hooks
* admin_head – Injects content into the ‘<head>’ section of admin pages
* admin_footer – Injects content into the ‘<footer>’ section of admin pages
* login_head – Injects content into the ‘<head>’ section of the login page
* login_footer – Injects content into the ‘<footer>’ section of the login page
* enqueue_block_assets – Injects content when block editor assets are loaded

Àwọn àwòrán ìbòjú

  • Administration screen – Block List (shows all reusable blocks with pagination)
  • Administration screen – Block Form (create/edit block with Safe/Raw toggle)
  • Grouped injection points dropdown (Classic vs Block Hooks clearly separated)
  • Example of Raw Mode toggle in block editor
  • Block Hooks injection after post content
  • Classic Hooks reference
  • Block Hooks reference (WordPress 6.8+)
  • Optional Context Hooks reference

Ìgbéwọlẹ̀

  1. Upload ‘wp-smart-content’ to the ‘/wp-content/plugins/’ directory.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. A new top-level menu called Smart Content appears in the WordPress admin sidebar.

FAQ

Why doesn’t my header script show up?

The template may not support the chosen hook. Don’t worry — it won’t break your site.

My site broke after installation!

Unpublish or delete the content pushed through the plugin. Ensure the content added is valid HTML, CSS, or JavaScript.

I still have plugin conflicts or the site looks messy.

Try selectively disabling other plugins to identify conflicts.

How do I uninstall the plugin?

Just uninstall it. No residual data or issues will remain.

More questions? Email business[at]vinodsebastian.com — I’ll try to respond promptly.

Àwọn àgbéyẹ̀wò

Kò sí àwọn àgbéyẹ̀wò fún plugin yìí.

Àwọn Olùkópa & Olùgbéejáde

“WP Smart Content” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí plugin yìí.

Àwọn Olùkópa

Túmọ̀ “WP Smart Content” sí èdè rẹ.

Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

Ṣàwárí koodu, ṣàyẹ̀wò ibi ìpamọ́ SVN, tàbí ṣe àgbékalẹ̀ sí àkọsílẹ̀ ìdàgbàsókè nípasẹ̀ RSS.

Àkọsílẹ̀ àwọn àyípadà

1.0.0

  • Initial launch.

1.0.1

  • Fixed AJAX content deletion bug caused by jQuery.

1.1.0

  • Revamped code.
  • Improved user experience.
  • Added ability to update content.
  • Fixed frontend display bug.
  • Small enhancements.

1.1.1

  • Fixed CSS side effects.

1.1.2

  • Fixed minor bugs.

1.1.3

  • Fixed major bug.

1.1.4

  • Enhancements.

1.2.0

  • Major restructuring and modularization of files for cleaner architecture and easier maintenance.
  • Updated admin UI to align with WordPress theme.
  • Added translation readiness.
  • Extended support for WordPress 6.8 Block Hooks API and additional injection points.
  • Introduced Raw Mode toggle (admins only) with Safe Mode fallback for non-admins.
  • Improved pagination controls for block lists.

1.2.1

  • Fixed major bug with block hooks api display.