title: Wordpress - shortcode to display custom post types in custom taxonomies in carousel
body: <p>I`ve found sth like this:
  <a href="https://wordpress.stackexchange.com/questions/47895/is-it-possible-to-create-a-shortcode-that-will-query-a-post-based-on-taxonomies">Is it possible to create a shortcode that will query a post based on taxonomies</a></p>
  
  <pre><code>function posts_shortcode_handler($atts, $content) {
  extract(shortcode_atts(array(
      'posts_per_page' =&gt; '5',
      'post_type' =&gt; 'gallery'
                  ), $atts));
  global $post;
  $temp = $post;
  $posts = new WP_Query($atts);
  $retVal = '';
  if ($posts-&gt;have_posts()) {
      while ($posts-&gt;have_posts()) {
          $posts-&gt;the_post();
          // these arguments will be available from inside $content
          $parameters = array(
              'PERMALINK' =&gt; get_permalink(),
              'TITLE' =&gt; get_the_title(),
              'CONTENT' =&gt; get_the_content(),
              'CATEGORIES' =&gt; get_the_category_list(', '),
              'THUMBNAIL' =&gt; get_the_post_thumbnail()
          );
          $finds = $replaces = array();
          foreach ($parameters as $find =&gt; $replace) {
              $finds[] = '{' . $find . '}';
              $replaces[] = $replace;
          }
          $retVal .= str_replace($finds, $replaces, $content);
      }
  }
  wp_reset_query();
  $post = $temp;
  return $retVal;
  }
  
  add_shortcode('galerie', 'posts_shortcode_handler');
  </code></pre>
  
  <p>My shortcode looks like this:</p>
  
  <pre><code>[galerie post_type="gallery" posts_per_page="5" taxonomy_name="movies"]
  &lt;h5&gt;&lt;a href="{PERMALINK}"&gt;{TITLE}&lt;/a&gt;&lt;/h5&gt;
  &lt;div&gt;{THUMBNAIL}
  {CONTENT}&lt;/div&gt;
  [/galerie]
  </code></pre>
  
  <p>My problem is about the taxonomy_name="movies" that`s not working for me.
  In my custom taxonomy name 'Kategorie' I have two sub categories 'movies' and 'photos'. 
  Shortcode ignores choosen 'taxonomy_name' and display all custom posts from post_type="gallery". I would like to choose sub category in my custom_taxonomy to display custom post type from shortcode.</p>
  
  <p>Please Help me, I`m stuck :(</p>