I would suggest a custom post type for your Testimonials. Each will be created as an individual post and you will have the ability to query, sort, categorize, your testimonials just as you can with blog posts, or any other post type. Non-technical site admins can simply “add new testimonial” and edit existing, etc, just as if they were working with pages, blog posts, etc
You must register your testimonial
post type for that to happen. An extremely simple example. You will want to define many more of the optional parameters than this example:
function wpse_register_post_types() {
$args = array(
'public' => true,
'label' => 'Testimonials'
);
register_post_type( 'testimonial', $args );
}
add_action( 'init', 'wpse_register_post_types' );
Full WP Codex documentation here:
https://codex.wordpress.org/Function_Reference/register_post_type
This is an extremely simplified example to show the basics: create a function to handle registration, hook that function to WP’s init
action.
In a real application you will want to define your labels and other arguments for the register_post_type()
function.
Depending on how you intend to use the testimonials on the front end, you will need templates for your new custom post type:
archive-testimonial.php
<– this will display all of the published testimonials; your example page
single-testimonial.php
<– used to display a single testimonial; when a user clicks through to see all of the details on a single testimonial
This will get you started. For advanced features, like displaying random testimonials on a page, you’ll want to read up on using the WP_Query
class for custom queries.
Welcome to WPSE!