Replicate the sydney theme testimonial slider

I like the testimonial slider on your sydney theme and would like to know if we can replicate that with custom post types?

Hello there,

You have to replicate the widget template file in the widgets/fp-testimonials.php. To modify which type of post to query, find this code block:

    $testimonials = new WP_Query( array(
    	'no_found_rows'       => true,
    	'post_status'         => 'publish',
    	'post_type' 		  => 'testimonials',
    	'posts_per_page'	  => $number,
    	'category_name'		  => $category
    ) ); 

Edit and set your custom post type slug in this line:

    'post_type'  => 'testimonials',

To load this file, see the theme’s functions and go to line 160.

However I’d strongly suggest you do this with a child theme, so that future update won’t eliminate the new file. In child theme’s functions, use this code:

   require get_stylesheet_directory() . "/widgets/child-fp-testimonials.php";

Check out my reply that’ll guide you adding child theme widget.

Regards,
Kharis

creating a child theme is a good idea. I will revert to your reply in regards to creating a child theme widget.

I will replicate that file and change the post type. Is there a piece of generic code in regards to displaying all post types? Or any other documentation where you can see all post types used by installed plugin/s?