KindWords - Testimonials Plugin
KindWords is a lightweight WordPress plugin that registers a custom post type for testimonials and displays them on the front end using a simple [kindwords] shortcode. It supports dynamic "Load More" functionality via AJAX, allowing for a seamless user experience without page reloads.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/nvsmith/kindwords/archive/refs/heads/main.zipKindWords - WP Plugin
Nate @ Outpost Web Studio | Last Updated: 28 MAY 2025
About The Project
KindWords is a custom WordPress plugin built with PHP and JavaScript that implements a testimonial system using WordPress best practices. It registers a Custom Post Type (CPT) to manage testimonials separately from regular posts and pages.
The plugin includes a front-end shortcode—[kindwords]—which displays a list of published testimonials. It also incorporates AJAX functionality via jQuery to provide a seamless "Load More" button that dynamically fetches additional testimonials without requiring a page reload.
Key Technologies & Methods Used
- PHP: Core plugin logic, shortcode rendering, and AJAX handling.
- WordPress APIs:
register_post_type()for the custom testimonial type.add_shortcode()for rendering testimonials via shortcode.wp_localize_script()to pass PHP data (like AJAX URLs and security nonces) to JavaScript.
- JavaScript (jQuery):
- Handles front-end AJAX requests for loading additional testimonials.
- Dynamically appends new content and handles pagination.
- Output Buffering: Uses
ob_start()andob_get_clean()to build HTML output cleanly for shortcode rendering. - Security: Implements
check_ajax_referer()to validate AJAX requests and protect against CSRF. - Content Filtering: Uses
apply_filters('the_content', ...)to ensure block content is rendered with full formatting (including shortcodes, embeds, etc.).
Getting Started
To use this plugin, upload the zipped kindwords file via the WordPress Dashboard > Plugins. Then activate.
You'll need to register a Custom Post Type named kindwords. Once registered, any testimonials added to this post type will be queryable by the plugin.
Use the shortcode [kindwords] on any page that you create or edit, and the plugin will automatically render your kindwords testimonials!