Creating a shortcode to display custom post type's taxonomy terms posts












0















I've got a shortcode working that basically displays all the posts from a custom post type in a custom layout (image, title, description). This works really well but I also made a taxonomy for this custom post type with various terms.



I figured I'd be able to add an attribute so that I could display the custom post types posts based on the category/term, I've not had any luck with it yet though.



Currently I've got this code for the show post shortcode and taxonomy:



            //shortcode to display posts
function show_posts_shortcode( $atts ) {

//shortcode atts
$a = shortcode_atts( array(
'post_type' => 'post',
'pagename' => '',
'limit' => '-1',
'order' => 'DESC',
'orderby' => 'date',
'thumbnail_size' => 'large',
'content' => '',
'button' => '',
'container_class' => '',
'post_class' => '',
'content_class' => '',
'featured_bg' => 'false',
'hide_featured' => '',
'hide_title' => '',
'show_custom_fields' => '',
'link_target' => '_self',
'bg_overlay' => 'transparent'),$atts);

// WP_Query arguments
$args = array(
'post_type' => explode( ',', $a[post_type] ),
'pagename' => $a['pagename'],
//'posts_per_page' => $a['count'], post_per_page doesn't work, altered while loop instead
'nopaging' => true,
'ignore_sticky_posts' => true,
'order' => $a['order'],
'orderby' => $a['orderby'],
);

// The Query
$post_query = new WP_Query( $args );

// The Loop
if ( $post_query->have_posts() ) {
$content_before;
$content_output;
$content_after;
ob_start(); ?>

<div class="<?php echo $a['container_class']; ?> clearfix"><?php

$content_before = ob_get_clean();

$limit = (int)$a['limit']; //custom post limiter as post_per_page arg does not work
$count = 0;

while ( $post_query->have_posts() && $limit !== $count ) {
$post_query->the_post();

ob_start(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class($a['post_class']); ?> <?php generate_article_schema( 'CreativeWork' ); if( $a['featured_bg'] == 'true' ) { ?>style="background-image: url(<?php the_post_thumbnail_url('full'); ?>)" <?php } ?>>

<div class="inside-article" <?php if( strlen($a['bg_overlay']) > 0 ) { ?>style="background-color: <?php echo $a['bg_overlay']; ?>"<?php } ?>>
<a href="<?php get_field('external_link') ? the_field('external_link') : the_permalink(); ?>" target="<?php echo $a['link_target']; ?>" title="<?php the_title(); ?>"><?php

if( $a['featured_bg'] !== 'true' && $a['hide_featured'] !== 'true' ) {

the_post_thumbnail( $a['thumbnail_size'] );
}

if( $a['hide_title'] !== 'true' ) {

the_title('<h2 class="entry-title" itemprop="headline">', '</h2>');
} ?>

<div class="entry-content <?php echo $a['content_class']; ?>" itemprop="text"><?php

if( $a['content'] == 'full' ) {

the_content();
}
elseif( $a['content'] == 'excerpt' || '' ) {

the_excerpt();
}

if( strlen($a['button']) > 0 ) {

?><p><a class="button" href="<?php the_permalink(); ?>"><?php echo $a['button']; ?></a></p><?php
} ?>

</div>
</a>
</div><!-- .inside-article -->
</article><!-- #post-## -->
<?php

$content_output .= ob_get_clean();

ob_start(); ?>

</div><!-- container --><?php

$content_after = ob_get_clean();

$count++;
}
return $content_before . $content_output . $content_after;

// Restore original Post Data
wp_reset_postdata();
}
else
{
ob_start();

_e('No ' . $a['post_type'] . ' found...');

return ob_get_clean();
}
}
add_shortcode( 'show-posts', 'show_posts_shortcode' );


// cpt taxonomy
if ( ! function_exists( 'sponsor_group' ) ) {

// Register Custom Taxonomy
function sponsor_group() {

$labels = array(
'name' => 'Sponsors',
'singular_name' => 'Sponsor',
'menu_name' => 'Sponsors',
'all_items' => 'All Sponsors',
'parent_item' => 'Parent Sponsor',
'parent_item_colon' => 'Parent Sponsor:',
'new_item_name' => 'New Sponsor Name',
'add_new_item' => 'Add New Sponsor',
'edit_item' => 'Edit Sponsor',
'update_item' => 'Update Sponsor',
'view_item' => 'View Sponsor',
'separate_items_with_commas' => 'Separate Sponsors with commas',
'add_or_remove_items' => 'Add or remove Sponsors',
'choose_from_most_used' => 'Choose from the most used',
'popular_items' => 'Popular Items',
'search_items' => 'Search Sponsors',
'not_found' => 'Not Found',
'no_terms' => 'No Sponsors',
'items_list' => 'Sponsors list',
'items_list_navigation' => 'Sponsors list navigation',
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
);
register_taxonomy( 'sponsor', array( 'manufacturer' ), $args );

}
add_action( 'init', 'sponsor_group', 0 );

}


I'd have to create individual shortcodes for each sponsor group alternatively, I just thought there'd be a more efficient way so it could be something like:



 [show-posts post_type="manufacturer" sponsor_group="education"]


That would show all education sponsors from the manufacturer post type.



Any help or pointing in the right direction is greatly appreciated.










share|improve this question



























    0















    I've got a shortcode working that basically displays all the posts from a custom post type in a custom layout (image, title, description). This works really well but I also made a taxonomy for this custom post type with various terms.



    I figured I'd be able to add an attribute so that I could display the custom post types posts based on the category/term, I've not had any luck with it yet though.



    Currently I've got this code for the show post shortcode and taxonomy:



                //shortcode to display posts
    function show_posts_shortcode( $atts ) {

    //shortcode atts
    $a = shortcode_atts( array(
    'post_type' => 'post',
    'pagename' => '',
    'limit' => '-1',
    'order' => 'DESC',
    'orderby' => 'date',
    'thumbnail_size' => 'large',
    'content' => '',
    'button' => '',
    'container_class' => '',
    'post_class' => '',
    'content_class' => '',
    'featured_bg' => 'false',
    'hide_featured' => '',
    'hide_title' => '',
    'show_custom_fields' => '',
    'link_target' => '_self',
    'bg_overlay' => 'transparent'),$atts);

    // WP_Query arguments
    $args = array(
    'post_type' => explode( ',', $a[post_type] ),
    'pagename' => $a['pagename'],
    //'posts_per_page' => $a['count'], post_per_page doesn't work, altered while loop instead
    'nopaging' => true,
    'ignore_sticky_posts' => true,
    'order' => $a['order'],
    'orderby' => $a['orderby'],
    );

    // The Query
    $post_query = new WP_Query( $args );

    // The Loop
    if ( $post_query->have_posts() ) {
    $content_before;
    $content_output;
    $content_after;
    ob_start(); ?>

    <div class="<?php echo $a['container_class']; ?> clearfix"><?php

    $content_before = ob_get_clean();

    $limit = (int)$a['limit']; //custom post limiter as post_per_page arg does not work
    $count = 0;

    while ( $post_query->have_posts() && $limit !== $count ) {
    $post_query->the_post();

    ob_start(); ?>

    <article id="post-<?php the_ID(); ?>" <?php post_class($a['post_class']); ?> <?php generate_article_schema( 'CreativeWork' ); if( $a['featured_bg'] == 'true' ) { ?>style="background-image: url(<?php the_post_thumbnail_url('full'); ?>)" <?php } ?>>

    <div class="inside-article" <?php if( strlen($a['bg_overlay']) > 0 ) { ?>style="background-color: <?php echo $a['bg_overlay']; ?>"<?php } ?>>
    <a href="<?php get_field('external_link') ? the_field('external_link') : the_permalink(); ?>" target="<?php echo $a['link_target']; ?>" title="<?php the_title(); ?>"><?php

    if( $a['featured_bg'] !== 'true' && $a['hide_featured'] !== 'true' ) {

    the_post_thumbnail( $a['thumbnail_size'] );
    }

    if( $a['hide_title'] !== 'true' ) {

    the_title('<h2 class="entry-title" itemprop="headline">', '</h2>');
    } ?>

    <div class="entry-content <?php echo $a['content_class']; ?>" itemprop="text"><?php

    if( $a['content'] == 'full' ) {

    the_content();
    }
    elseif( $a['content'] == 'excerpt' || '' ) {

    the_excerpt();
    }

    if( strlen($a['button']) > 0 ) {

    ?><p><a class="button" href="<?php the_permalink(); ?>"><?php echo $a['button']; ?></a></p><?php
    } ?>

    </div>
    </a>
    </div><!-- .inside-article -->
    </article><!-- #post-## -->
    <?php

    $content_output .= ob_get_clean();

    ob_start(); ?>

    </div><!-- container --><?php

    $content_after = ob_get_clean();

    $count++;
    }
    return $content_before . $content_output . $content_after;

    // Restore original Post Data
    wp_reset_postdata();
    }
    else
    {
    ob_start();

    _e('No ' . $a['post_type'] . ' found...');

    return ob_get_clean();
    }
    }
    add_shortcode( 'show-posts', 'show_posts_shortcode' );


    // cpt taxonomy
    if ( ! function_exists( 'sponsor_group' ) ) {

    // Register Custom Taxonomy
    function sponsor_group() {

    $labels = array(
    'name' => 'Sponsors',
    'singular_name' => 'Sponsor',
    'menu_name' => 'Sponsors',
    'all_items' => 'All Sponsors',
    'parent_item' => 'Parent Sponsor',
    'parent_item_colon' => 'Parent Sponsor:',
    'new_item_name' => 'New Sponsor Name',
    'add_new_item' => 'Add New Sponsor',
    'edit_item' => 'Edit Sponsor',
    'update_item' => 'Update Sponsor',
    'view_item' => 'View Sponsor',
    'separate_items_with_commas' => 'Separate Sponsors with commas',
    'add_or_remove_items' => 'Add or remove Sponsors',
    'choose_from_most_used' => 'Choose from the most used',
    'popular_items' => 'Popular Items',
    'search_items' => 'Search Sponsors',
    'not_found' => 'Not Found',
    'no_terms' => 'No Sponsors',
    'items_list' => 'Sponsors list',
    'items_list_navigation' => 'Sponsors list navigation',
    );
    $args = array(
    'labels' => $labels,
    'hierarchical' => true,
    'public' => true,
    'show_ui' => true,
    'show_admin_column' => true,
    'show_in_nav_menus' => true,
    'show_tagcloud' => true,
    );
    register_taxonomy( 'sponsor', array( 'manufacturer' ), $args );

    }
    add_action( 'init', 'sponsor_group', 0 );

    }


    I'd have to create individual shortcodes for each sponsor group alternatively, I just thought there'd be a more efficient way so it could be something like:



     [show-posts post_type="manufacturer" sponsor_group="education"]


    That would show all education sponsors from the manufacturer post type.



    Any help or pointing in the right direction is greatly appreciated.










    share|improve this question

























      0












      0








      0








      I've got a shortcode working that basically displays all the posts from a custom post type in a custom layout (image, title, description). This works really well but I also made a taxonomy for this custom post type with various terms.



      I figured I'd be able to add an attribute so that I could display the custom post types posts based on the category/term, I've not had any luck with it yet though.



      Currently I've got this code for the show post shortcode and taxonomy:



                  //shortcode to display posts
      function show_posts_shortcode( $atts ) {

      //shortcode atts
      $a = shortcode_atts( array(
      'post_type' => 'post',
      'pagename' => '',
      'limit' => '-1',
      'order' => 'DESC',
      'orderby' => 'date',
      'thumbnail_size' => 'large',
      'content' => '',
      'button' => '',
      'container_class' => '',
      'post_class' => '',
      'content_class' => '',
      'featured_bg' => 'false',
      'hide_featured' => '',
      'hide_title' => '',
      'show_custom_fields' => '',
      'link_target' => '_self',
      'bg_overlay' => 'transparent'),$atts);

      // WP_Query arguments
      $args = array(
      'post_type' => explode( ',', $a[post_type] ),
      'pagename' => $a['pagename'],
      //'posts_per_page' => $a['count'], post_per_page doesn't work, altered while loop instead
      'nopaging' => true,
      'ignore_sticky_posts' => true,
      'order' => $a['order'],
      'orderby' => $a['orderby'],
      );

      // The Query
      $post_query = new WP_Query( $args );

      // The Loop
      if ( $post_query->have_posts() ) {
      $content_before;
      $content_output;
      $content_after;
      ob_start(); ?>

      <div class="<?php echo $a['container_class']; ?> clearfix"><?php

      $content_before = ob_get_clean();

      $limit = (int)$a['limit']; //custom post limiter as post_per_page arg does not work
      $count = 0;

      while ( $post_query->have_posts() && $limit !== $count ) {
      $post_query->the_post();

      ob_start(); ?>

      <article id="post-<?php the_ID(); ?>" <?php post_class($a['post_class']); ?> <?php generate_article_schema( 'CreativeWork' ); if( $a['featured_bg'] == 'true' ) { ?>style="background-image: url(<?php the_post_thumbnail_url('full'); ?>)" <?php } ?>>

      <div class="inside-article" <?php if( strlen($a['bg_overlay']) > 0 ) { ?>style="background-color: <?php echo $a['bg_overlay']; ?>"<?php } ?>>
      <a href="<?php get_field('external_link') ? the_field('external_link') : the_permalink(); ?>" target="<?php echo $a['link_target']; ?>" title="<?php the_title(); ?>"><?php

      if( $a['featured_bg'] !== 'true' && $a['hide_featured'] !== 'true' ) {

      the_post_thumbnail( $a['thumbnail_size'] );
      }

      if( $a['hide_title'] !== 'true' ) {

      the_title('<h2 class="entry-title" itemprop="headline">', '</h2>');
      } ?>

      <div class="entry-content <?php echo $a['content_class']; ?>" itemprop="text"><?php

      if( $a['content'] == 'full' ) {

      the_content();
      }
      elseif( $a['content'] == 'excerpt' || '' ) {

      the_excerpt();
      }

      if( strlen($a['button']) > 0 ) {

      ?><p><a class="button" href="<?php the_permalink(); ?>"><?php echo $a['button']; ?></a></p><?php
      } ?>

      </div>
      </a>
      </div><!-- .inside-article -->
      </article><!-- #post-## -->
      <?php

      $content_output .= ob_get_clean();

      ob_start(); ?>

      </div><!-- container --><?php

      $content_after = ob_get_clean();

      $count++;
      }
      return $content_before . $content_output . $content_after;

      // Restore original Post Data
      wp_reset_postdata();
      }
      else
      {
      ob_start();

      _e('No ' . $a['post_type'] . ' found...');

      return ob_get_clean();
      }
      }
      add_shortcode( 'show-posts', 'show_posts_shortcode' );


      // cpt taxonomy
      if ( ! function_exists( 'sponsor_group' ) ) {

      // Register Custom Taxonomy
      function sponsor_group() {

      $labels = array(
      'name' => 'Sponsors',
      'singular_name' => 'Sponsor',
      'menu_name' => 'Sponsors',
      'all_items' => 'All Sponsors',
      'parent_item' => 'Parent Sponsor',
      'parent_item_colon' => 'Parent Sponsor:',
      'new_item_name' => 'New Sponsor Name',
      'add_new_item' => 'Add New Sponsor',
      'edit_item' => 'Edit Sponsor',
      'update_item' => 'Update Sponsor',
      'view_item' => 'View Sponsor',
      'separate_items_with_commas' => 'Separate Sponsors with commas',
      'add_or_remove_items' => 'Add or remove Sponsors',
      'choose_from_most_used' => 'Choose from the most used',
      'popular_items' => 'Popular Items',
      'search_items' => 'Search Sponsors',
      'not_found' => 'Not Found',
      'no_terms' => 'No Sponsors',
      'items_list' => 'Sponsors list',
      'items_list_navigation' => 'Sponsors list navigation',
      );
      $args = array(
      'labels' => $labels,
      'hierarchical' => true,
      'public' => true,
      'show_ui' => true,
      'show_admin_column' => true,
      'show_in_nav_menus' => true,
      'show_tagcloud' => true,
      );
      register_taxonomy( 'sponsor', array( 'manufacturer' ), $args );

      }
      add_action( 'init', 'sponsor_group', 0 );

      }


      I'd have to create individual shortcodes for each sponsor group alternatively, I just thought there'd be a more efficient way so it could be something like:



       [show-posts post_type="manufacturer" sponsor_group="education"]


      That would show all education sponsors from the manufacturer post type.



      Any help or pointing in the right direction is greatly appreciated.










      share|improve this question














      I've got a shortcode working that basically displays all the posts from a custom post type in a custom layout (image, title, description). This works really well but I also made a taxonomy for this custom post type with various terms.



      I figured I'd be able to add an attribute so that I could display the custom post types posts based on the category/term, I've not had any luck with it yet though.



      Currently I've got this code for the show post shortcode and taxonomy:



                  //shortcode to display posts
      function show_posts_shortcode( $atts ) {

      //shortcode atts
      $a = shortcode_atts( array(
      'post_type' => 'post',
      'pagename' => '',
      'limit' => '-1',
      'order' => 'DESC',
      'orderby' => 'date',
      'thumbnail_size' => 'large',
      'content' => '',
      'button' => '',
      'container_class' => '',
      'post_class' => '',
      'content_class' => '',
      'featured_bg' => 'false',
      'hide_featured' => '',
      'hide_title' => '',
      'show_custom_fields' => '',
      'link_target' => '_self',
      'bg_overlay' => 'transparent'),$atts);

      // WP_Query arguments
      $args = array(
      'post_type' => explode( ',', $a[post_type] ),
      'pagename' => $a['pagename'],
      //'posts_per_page' => $a['count'], post_per_page doesn't work, altered while loop instead
      'nopaging' => true,
      'ignore_sticky_posts' => true,
      'order' => $a['order'],
      'orderby' => $a['orderby'],
      );

      // The Query
      $post_query = new WP_Query( $args );

      // The Loop
      if ( $post_query->have_posts() ) {
      $content_before;
      $content_output;
      $content_after;
      ob_start(); ?>

      <div class="<?php echo $a['container_class']; ?> clearfix"><?php

      $content_before = ob_get_clean();

      $limit = (int)$a['limit']; //custom post limiter as post_per_page arg does not work
      $count = 0;

      while ( $post_query->have_posts() && $limit !== $count ) {
      $post_query->the_post();

      ob_start(); ?>

      <article id="post-<?php the_ID(); ?>" <?php post_class($a['post_class']); ?> <?php generate_article_schema( 'CreativeWork' ); if( $a['featured_bg'] == 'true' ) { ?>style="background-image: url(<?php the_post_thumbnail_url('full'); ?>)" <?php } ?>>

      <div class="inside-article" <?php if( strlen($a['bg_overlay']) > 0 ) { ?>style="background-color: <?php echo $a['bg_overlay']; ?>"<?php } ?>>
      <a href="<?php get_field('external_link') ? the_field('external_link') : the_permalink(); ?>" target="<?php echo $a['link_target']; ?>" title="<?php the_title(); ?>"><?php

      if( $a['featured_bg'] !== 'true' && $a['hide_featured'] !== 'true' ) {

      the_post_thumbnail( $a['thumbnail_size'] );
      }

      if( $a['hide_title'] !== 'true' ) {

      the_title('<h2 class="entry-title" itemprop="headline">', '</h2>');
      } ?>

      <div class="entry-content <?php echo $a['content_class']; ?>" itemprop="text"><?php

      if( $a['content'] == 'full' ) {

      the_content();
      }
      elseif( $a['content'] == 'excerpt' || '' ) {

      the_excerpt();
      }

      if( strlen($a['button']) > 0 ) {

      ?><p><a class="button" href="<?php the_permalink(); ?>"><?php echo $a['button']; ?></a></p><?php
      } ?>

      </div>
      </a>
      </div><!-- .inside-article -->
      </article><!-- #post-## -->
      <?php

      $content_output .= ob_get_clean();

      ob_start(); ?>

      </div><!-- container --><?php

      $content_after = ob_get_clean();

      $count++;
      }
      return $content_before . $content_output . $content_after;

      // Restore original Post Data
      wp_reset_postdata();
      }
      else
      {
      ob_start();

      _e('No ' . $a['post_type'] . ' found...');

      return ob_get_clean();
      }
      }
      add_shortcode( 'show-posts', 'show_posts_shortcode' );


      // cpt taxonomy
      if ( ! function_exists( 'sponsor_group' ) ) {

      // Register Custom Taxonomy
      function sponsor_group() {

      $labels = array(
      'name' => 'Sponsors',
      'singular_name' => 'Sponsor',
      'menu_name' => 'Sponsors',
      'all_items' => 'All Sponsors',
      'parent_item' => 'Parent Sponsor',
      'parent_item_colon' => 'Parent Sponsor:',
      'new_item_name' => 'New Sponsor Name',
      'add_new_item' => 'Add New Sponsor',
      'edit_item' => 'Edit Sponsor',
      'update_item' => 'Update Sponsor',
      'view_item' => 'View Sponsor',
      'separate_items_with_commas' => 'Separate Sponsors with commas',
      'add_or_remove_items' => 'Add or remove Sponsors',
      'choose_from_most_used' => 'Choose from the most used',
      'popular_items' => 'Popular Items',
      'search_items' => 'Search Sponsors',
      'not_found' => 'Not Found',
      'no_terms' => 'No Sponsors',
      'items_list' => 'Sponsors list',
      'items_list_navigation' => 'Sponsors list navigation',
      );
      $args = array(
      'labels' => $labels,
      'hierarchical' => true,
      'public' => true,
      'show_ui' => true,
      'show_admin_column' => true,
      'show_in_nav_menus' => true,
      'show_tagcloud' => true,
      );
      register_taxonomy( 'sponsor', array( 'manufacturer' ), $args );

      }
      add_action( 'init', 'sponsor_group', 0 );

      }


      I'd have to create individual shortcodes for each sponsor group alternatively, I just thought there'd be a more efficient way so it could be something like:



       [show-posts post_type="manufacturer" sponsor_group="education"]


      That would show all education sponsors from the manufacturer post type.



      Any help or pointing in the right direction is greatly appreciated.







      wordpress wordpress-theming custom-post-type custom-taxonomy wordpress-shortcode






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 21 '18 at 23:28









      Adam RAdam R

      456




      456
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53421879%2fcreating-a-shortcode-to-display-custom-post-types-taxonomy-terms-posts%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53421879%2fcreating-a-shortcode-to-display-custom-post-types-taxonomy-terms-posts%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          'app-layout' is not a known element: how to share Component with different Modules

          android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

          WPF add header to Image with URL pettitions [duplicate]