WP Manifestindependent plugin directory
manifest / email / sam-newsletter

SAM Newsletter

A lightweight WordPress plugin that adds a custom Gutenberg “SAM Newsletter” block with AJAX form submission, validation, and a searchable admin dashboard for managing subscribers

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/hassansnexus/sam-newsletter/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

SAM Newsletter Plugin

Description: A simple WordPress plugin that provides a newsletter subscription block with AJAX submission and an admin dashboard view.


📋 Features

  • Custom Gutenberg block: SAM Newsletter
  • AJAX-based subscription (no page reload)
  • Client-side and server-side validation
  • Prevents duplicate subscriptions
  • Stores data in a custom database table
  • Admin page for viewing all subscribers
  • Optional search/filter in admin
  • Clean and minimal design

🛠️ Installation

  1. Download or clone this repository.
  2. Place the folder inside your WordPress plugins directory:
  3. Activate the plugin from WordPress → Plugins → Installed Plugins.

🧩 Usage

  1. In the WordPress block editor (Gutenberg), search for "SAM Newsletter" block.
  2. Add it to any page or post.
  3. View the page and test the form:
  • Fill in name and email.
  • Submits via AJAX (no reload).
  • Displays success or error message instantly.

📊 Admin Page

  • Navigate to Dashboard → SAM Newsletter.
  • View all newsletter subscribers.
  • Use the search box to filter by name or email.

🧱 Database Table

When activated, the plugin creates a table:

Column Type Description
id INT Auto increment primary key
name VARCHAR(100) Subscriber name
email VARCHAR(100) Subscriber email (unique)
created_at DATETIME Timestamp of subscription

When deactivated, the table is removed.


🧰 Technologies Used

  • PHP (WordPress Plugin API)
  • JavaScript (jQuery, Gutenberg)
  • HTML5 + CSS3
  • MySQL (via $wpdb)

🎥 Demo (Loom)

Include your Loom demo link here once recorded:
👉 Demo Video Link


📜 License

This plugin was created for an interview assignment and is free to use for educational purposes.