Calling CPT by category
-
Ok, I setup a CPT and added the category capability to it when I set it up. Then I added several categories and I want to call a different category on one page and another category on another page.
Here’s my code, which doesn’t work. Any help is appreciated.
<?php $cpt = get_post_meta($post->ID, "my_meta_box_select", true); ?> <?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); ?> <?php $wp_query->query("post_type= '.$cpt.'&paged=".$paged.'&showposts=5&cat=upcoming-meetings'); ?>
https://www.ads-software.com/extend/plugins/custom-post-type-ui/
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Calling CPT by category’ is closed to new replies.