title: How to query custom post type testimonials and generate Ul list and create JS Slider
body: <p>I had created custom testimonial by using post type. I want to create a JS testimonials slider on home page . I dont have an idea how to do it .. please help me </p>
  
  <pre><code>add_action( 'init', 'testimonials_post_type' );
  function testimonials_post_type() {
      $labels = array(
          'name' =&gt; 'Testimonials',
          'singular_name' =&gt; 'Testimonial',
          'add_new' =&gt; 'Add New',
          'add_new_item' =&gt; 'Add New Testimonial',
          'edit_item' =&gt; 'Edit Testimonial',
          'new_item' =&gt; 'New Testimonial',
          'view_item' =&gt; 'View Testimonial',
          'search_items' =&gt; 'Search Testimonials',
          'not_found' =&gt;  'No Testimonials found',
          'not_found_in_trash' =&gt; 'No Testimonials in the trash',
          'parent_item_colon' =&gt; '',
      );
  
      register_post_type( 'testimonials', array(
          'labels' =&gt; $labels,
          'public' =&gt; true,
          'publicly_queryable' =&gt; true,
          'show_ui' =&gt; true,
          'exclude_from_search' =&gt; true,
          'query_var' =&gt; true,
          'rewrite' =&gt; true,
          'capability_type' =&gt; 'post',
          'has_archive' =&gt; true,
          'hierarchical' =&gt; false,
          'menu_position' =&gt; 10,
          'supports' =&gt; array( 'editor' ),
          'register_meta_box_cb' =&gt; 'testimonials_meta_boxes', // Callback function for custom metaboxes
      ) );
  }
  </code></pre>