Smart Tag
Blocks

A WordPress Plugin

For more plugins, please check my WordPress Plugins Page

This plugin Automatically injects conditional content blocks into your posts based on their assigned tags.


This plugin provides a simple yet powerful way to display targeted content to your readers. By linking specific post tags to custom content, reusable blocks, or block patterns, you can automatically show relevant information or calls-to-action without manually editing each post.

Features:

  • Targeted Content: Automatically adds content to a post only if it has a specific tag.
  • Flexible Sources: Inject Custom Content (HTML, shortcodes, or Gutenberg blocks), existing Reusable Blocks, or registered Block Patterns.
  • Intuitive Admin Interface: A clean, tabbed dashboard allows you to easily manage your rules and view instructions.
  • Live Updates: Rules are applied instantly to the frontend and are automatically saved when you add, edit, or remove them.
  • Efficient: Only one matching rule is applied per post, ensuring minimal performance impact.

Installation

  1. Upload: Download the plugin ZIP file from this repository and upload it to your WordPress site via the Plugins > Add New > Upload Plugin page.
  2. Activate: Activate the plugin through the Plugins menu in WordPress.
  3. Create Directory: The plugin will automatically create a secure folder (/wp-content/uploads/35s-secure-files) to store your files.

Use Cases

  • Dynamic Content Display: Automatically display specific content for posts based on assigned tags, enhancing relevance for readers.
  • Targeted Calls-to-Action: Create and display tailored call-to-action messages on posts with specific tags to increase conversions.
  • Content Variations: Show different content variations on the same topic based on the tags assigned, allowing for personalized experiences.
  • Promotions & Offers: Automatically inject promotional blocks or offers relevant to the content of the post, based on its tags.
  • Additional Resources: Provide links to related articles, videos, or downloads by associating these resources with specific tags.
  • SEO Optimization: Improve SEO and user engagement by presenting content that is closely related to readers’ interests determined by post tags.
  • Custom Message for Categories: Display specialized messages for different categories or topics covered by posts by using tags to connect content.
  • Regional Content Customization: Use specific tags to show region-specific content for localized engagement.
  • Event Promotion: Automatically add information about upcoming events related to the content of a post by tagging relevant posts.
  • Multilingual Content Support: Use tags to dynamically show translated content blocks depending on the site’s language settings.
  • E-learning and Resource Management: For educational sites, inject relevant study materials or resources based on the lesson tags assigned to posts.
  • User Feedback Solicitation: Automatically display feedback forms or surveys relevant to the content of the post, encouraging reader interaction.
  • Streamlined Content Management: Easily manage large amounts of content by setting rules that automatically apply specific block patterns to new or existing posts.
  • A/B Testing Content: Use different tags to test which version of content performs better with audiences, gathering data on what resonates more.

Usage:

  • Navigate to the 35s Plugins > Smart Tag Blocks menu item in your WordPress admin dashboard.
  • In the Rules tab, you will find a table of your current rules and a form to add new ones.
  • To add a new rule:
    • Select an existing tag from the “Tag” dropdown.
    • Choose the “Source” of your content (Custom Content, Reusable Block, or Block Pattern).
    • Depending on your source choice, either enter the content or select a block/pattern.
    • Click Save Rule.
  • Once a rule is saved, it will be automatically applied to any single post that has the corresponding tag. The content will appear at the beginning of the post’s main body..

License

This plugin is licensed under the GPL v2 or later.


Screen Shots

Latest Version

You will receive a link via email to the packaged plugin ready to be upload to WordPress and activated.

If you prefer you can look at the code on GitHub Here