Install
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/alexphex/wp-elementor-testimonials-widget/archive/refs/heads/main.zipA simple WordPress plugin that adds a custom Testimonials post type and displays testimonials using a custom Elementor widget.
Features
-
Custom Post Type:
Testimonials -
Custom fields:
- Name
- Company
- Testimonial text
- Photo URL
-
Custom Elementor widget
-
Display testimonials using
WP_Query -
Basic sanitization and escaping
-
OOP-based plugin structure
-
Elementor dependency check
Plugin Structure
custom-testimonials/
├── custom-testimonials.php
├── includes/
│ ├── class-plugin.php
│ ├── class-testimonials-cpt.php
│ └── class-elementor-widget.php
└── assets/
└── testimonials.css
Requirements
- WordPress
- Elementor
- PHP 7.4+
Installation
- Download or clone the repository.
- Copy the
custom-testimonialsfolder to:
/wp-content/plugins/
- Activate Custom Testimonials from the WordPress admin.
- Make sure Elementor is installed and activated.
Usage
After activating the plugin:
-
Go to Testimonials → Add New.
-
Add the testimonial information.
-
Fill in the custom fields:
- Name
- Company
- Testimonial
- Photo URL
-
Publish the testimonial.
-
Edit a page with Elementor.
-
Add the Testimonials widget.
-
Select how many testimonials should be displayed.
The widget automatically gets published testimonials using WP_Query.
Notes
This is a small practice/project plugin created to demonstrate:
- WordPress plugin development
- Custom Post Types
- Post meta
- WordPress hooks
WP_Query- Elementor custom widgets
- Basic WordPress security practices
The project intentionally keeps the implementation simple and does not use ACF or other custom field plugins.