Hey Tobias!
Are you referring to the full List of Testimonials, or are you referring to an individual, full length Testimonial?
I should be able to help with either, but the documentation on both methods is sparse right now so I understand why you would have trouble getting this done – I apologize for that!
All the best,
Richard
Hi Richard,
I mean the individual full length testimonial. I don’t want to use a standard page template for it.
Thank you for your help,
Tobias
-
This reply was modified 9 years, 5 months ago by
bacardi-83.
Hi Richard,
do you have any advice how to change that?
Thank you
Hey Bacardi!
Depending on the customization you want, you have a few choices.
1) We have a filter, the single_testimonial_content_filter, which will allow you to modify the HTML inside of the testimonial itself (this will affect Testimonials across the whole site.)
2) We support templates for single testimonials. To customize the Single Testimonial template, inside your theme folder copy your single.php (single post template) into a new template called single-testimonial.php (this template will then be used when viewing our CPT.) Inside this template, you can remove anything not wanted (such as the WordPress author, related posts, or other non-testimonial content that may exist in your Single post template.) That is the usual stuff people are looking to change.
Does that help at all?
All the best,
Richard
Hi Richard,
I tried option 2 however it doesn’t work due to the following line of code:
include( $this->config->dir_path . "templates/single_testimonial.php" );
This line (745 gp-testimonial-class.php) of code means that template will always be pulled from the template in the plugin.
Would you be able to change the code to the following which would allow us to use a template from within the theme?
$themed_template = get_stylesheet_directory() . "/single-testimonial.php";
if(file_exists($themed_template)){
include( $themed_template);
}
else {
include( $this->config->dir_path . "templates/single_testimonial.php" );
}
-
This reply was modified 9 years, 3 months ago by
LABCAT.
-
This reply was modified 9 years, 3 months ago by
LABCAT.
Hey there!
This is a good suggestion, and one we’ll be sure to implement a version of in our next release.
If you have the above modification in place, you should be safe to update the next time one is available.
Best,
Richard
Hey Bacardi!
I wanted to let you know we’ve made an update in version 2.2 that allows user supplied templates.
Copy the single-testimonial.php template file from within easy-testimonials to a new folder inside your theme’s folder, called ‘easy-testimonials’, and you should be able to customize and use it as you see fit!
Thanks for using our software.
All the best,
Richard