Building Custom Testimonials in WordPress Themes
Posted on 21st June 2023
Building Custom Testimonials in WordPress Themes
WordPress is a popular content management system (CMS) that allows users to create and manage websites. WordPress themes are collections of files that work together to create the design and functionality of a WordPress website.
One of the features that many WordPress themes include is the ability to display testimonials from customers or clients on the website. Testimonials can be a powerful way to build trust with potential customers and show off the positive experiences that others have had with your business.
In this article, we’ll show you how to build custom testimonials in WordPress themes. We’ll cover the following topics:
Why Use Testimonials on Your WordPress Website?
How to Add Testimonials to Your WordPress Theme
Why Use Testimonials on Your WordPress Website?
Testimonials are a great way to build trust with potential customers. When people see that others have had positive experiences with your business, they’re more likely to do business with you as well.
Including testimonials on your WordPress website can also help to improve your search engine optimization (SEO). This is because testimonials can help to create fresh, unique content on your website.
Google and other search engines love fresh, unique content. So including testimonials on your website can help to improve your website’s SEO and get you more traffic from the search engines.
How to Add Testimonials to Your WordPress Theme
Now that we’ve covered why you would want to use testimonials on your WordPress website, let’s take a look at how to add them to your WordPress theme.
There are two ways to add testimonials to your WordPress theme:
1. Use a WordPress plugin
2. Manually add testimonials to your theme
We’ll cover both methods in this article.
Using a WordPress Plugin
If you want to add testimonials to your WordPress theme without having to code anything, you can use a WordPress plugin.
There are a few different WordPress plugins that you can use to add testimonials to your website. We recommend using the Testimonials by WidgetPack plugin.
This plugin is easy to use and it lets you add testimonials to your website using a widget. You can also customize the look of your testimonials using the plugin’s settings.
To use the Testimonials by WidgetPack plugin, first, you’ll need to install and activate the plugin. For more information, see our article on how to install a WordPress plugin.
Once the plugin is activated, you’ll need to add your testimonials to the plugin’s settings page. To do this, go to Testimonials » Add New in your WordPress admin area.
On the Add New Testimonial page, you’ll need to enter the testimonial author’s name, the testimonial itself, and the URL of the author’s website (if they have one).
You can also add a photo of the testimonial author if you want. Once you’re finished, click the Publish button to save your changes.
Repeat this process for each testimonial that you want to add to your website.
Once you’ve added all of your testimonials, you can display them on your website using the plugin’s widget. To do this, go to Appearance » Widgets in your WordPress admin area.
You should see a widget called Testimonials by WidgetPack. Drag this widget to the sidebar or other widget area where you want to display your testimonials.
Then, select the testimonials that you want to display in the widget. You can also choose how many testimonials to display and whether to display the author’s photo.
Click the Save button to save your changes. Your testimonials should now be displayed on your website.
Manually Adding Testimonials to Your Theme
If you don’t want to use a WordPress plugin, you can also add testimonials to your WordPress theme manually.
To do this, you’ll need to edit your theme’s template files. We recommend creating a child theme before making any changes to your theme. This will ensure that your changes are not lost when your theme is updated.
For more information, see our article on how to create a WordPress child theme.
Once you’ve created a child theme, you can edit your theme’s template files. The specific template file that you need to edit will depend on where you want to display your testimonials.
If you want to display your testimonials on your website’s home page, you’ll need to edit the home.php template file. If you want to display your testimonials on a separate page, you’ll need to edit the page.php template file.
You can edit your theme’s template files using a code editor like Notepad++ or Microsoft Visual Studio Code. Alternatively, you can edit your theme’s template files directly from your WordPress admin area.
To do this, go to Appearance » Theme Editor in your WordPress admin area. On the Theme Editor page, select the template file that you want to edit from the dropdown menu on the right.
Once you’ve found the template file that you want to edit, click the Update File button to save your changes.
Your changes will now be live on your website.
Adding Testimonials to Your WordPress Theme
Adding testimonials to your WordPress theme is a great way to build trust with potential customers and show off the positive experiences that others have had with your business.
There are two ways to add testimonials to your WordPress theme:
1. Use a WordPress plugin
2. Manually add testimonials to your theme
We recommend using a WordPress plugin like Testimonials by WidgetPack to add testimonials to your website. This plugin is easy to use and it lets you add testimonials to your website using a widget.
If you don’t want to use a plugin, you can also add testimonials to your WordPress theme manually. To do this, you’ll need to edit your theme’s template files.
We hope this article has helped you to learn how to add testimonials to your WordPress theme.
Building Custom Testimonials in WordPress Themes
If you’re looking to add testimonials to your WordPress theme, you’re in luck. Testimonials are relatively easy to add to most themes.
In this article, we’ll show you how to build custom testimonials in WordPress themes.
Why Add Testimonials to Your WordPress Theme?
Testimonials are a great way to build trust and credibility with your audience.
They show that other people have used your product or service and been happy with the results. This can be helpful in convincing new visitors to convert into customers or subscribers.
Testimonials can also help improve your SEO. That’s because they provide an opportunity to add rich snippets to your pages.
Rich snippets are a type of structured data that helps search engines understand the content on your page. They can result in your pages being displayed with additional information in the search results, like star ratings.
This can help you stand out from the competition and attract more clicks to your site.
How to Add Testimonials in WordPress Themes
There are a few different ways to add testimonials in WordPress themes.
The easiest way is to use a plugin. We recommend the Testimonials by Woothemes plugin. It’s a free plugin that lets you easily add testimonials to your site.
Once you’ve installed and activated the plugin, you can add testimonials by going to Testimonials » Add New in your WordPress admin area.
On the add new testimonial screen, you’ll need to enter the testimonial author’s name, the testimonial content, and an optional URL.
You can also add a featured image for the testimonial. This can be helpful if you want to display the author’s photo alongside the testimonial.
Once you’re happy with your testimonial, click the Publish button to add it to your site.
The plugin comes with a few different ways to display your testimonials. You can use the [testimonials] shortcode to insert testimonials into your posts and pages.
You can also use the widget to add testimonials to your sidebar or other widget-ready areas.
If you want more control over how your testimonials are displayed, you can edit the plugin’s templates. To do this, go to Testimonials » Settings and click on the Templates tab.
This will bring up the plugin’s templates in a text editor. You can edit these templates to change how your testimonials are displayed.
If you don’t want to use a plugin, you can also add testimonials to your WordPress theme by editing your theme files.
To do this, you’ll first need to create a new file called single-testimonial.php in your theme’s folder. You can do this using a text editor like Notepad++ or Sublime Text.
Once you’ve created the file, you’ll need to add the following code to it:
<article id="post-” >
<?php the_title( '
‘, ‘
‘ ); ?>
<?php
if ( ! empty( $testimonial_author ) ) {
echo esc_html( $testimonial_author );
}
if ( ! empty( $testimonial_url ) ) {
echo ' – ‘ . esc_html( $testimonial_url ) . ‘‘;
}
?>
_x( ‘Testimonials’, ‘post type general name’, ‘your-theme’ ),
‘singular_name’ => _x( ‘Testimonial’, ‘post type singular name’, ‘your-theme’ ),
‘menu_name’ => _x( ‘Testimonials’, ‘admin menu’, ‘your-theme’ ),
‘name_admin_bar’ => _x( ‘Testimonial’, ‘add new on admin bar’, ‘your-theme’ ),
‘add_new’ => _x( ‘Add New’, ‘testimonial’, ‘your-theme’ ),
‘add_new_item’ => __( ‘Add New Testimonial’, ‘your-theme’ ),
‘new_item’ => __( ‘New Testimonial’, ‘your-theme’ ),
‘edit_item’ => __( ‘Edit Testimonial’, ‘your-theme’ ),
‘view_item’ => __( ‘View Testimonial’, ‘your-theme’ ),
‘all_items’ => __( ‘All Testimonials’, ‘your-theme’ ),
‘search_items’ => __( ‘Search Testimonials’, ‘your-theme’ ),
‘parent_item_colon’ => __( ‘Parent Testimonials:’, ‘your-theme’ ),
‘not_found’ => __( ‘No testimonials found.’, ‘your-theme’ ),
‘not_found_in_trash’ => __( ‘No testimonials found in Trash.’, ‘your-theme’ )
);
$args = array(
‘labels’ => $labels,
‘description’ => __( ‘Description.’, ‘your-theme’ ),
‘public’ => true,
‘publicly_queryable’ => true,
‘show_ui’ => true,
‘show_in_menu’ => true,
‘query_var’ => true,
‘rewrite’ => array( ‘slug’ => ‘testimonial’ ),
‘capability_type’ => ‘post’,
‘has_archive’ => true,
‘hierarchical’ => false,
‘menu_position’ => null,
‘supports’ => array( ‘title’, ‘editor’, ‘author’, ‘thumbnail’, ‘excerpt’, ‘comments’ )
);
register_post_type( ‘testimonial’, $args );
}
add_action( ‘init’, ‘my_testimonials_init’ );
The code above registers a new post type for testimonials. It also adds some labels and sets up capabilities for the testimonials post type.
You can now add testimonials by going to Testimonials » Add New in your WordPress admin area.
On the add new testimonial screen, you’ll need to enter the testimonial author’s name, the testimonial content, and an optional URL.
You can also add a featured image for the testimonial. This can be helpful if you want to display the author’s photo alongside the testimonial.
Once you’re happy with your testimonial, click the Publish button to add it to your site.