WordPress Custom Post show with category id
-
<?php
$posts = new Wp_Query(array(
‘post_type’ => ‘routines’,
‘post_type_cat’ => ‘class_routine’,
‘posts_per_page’ => 20,
‘orderby’ => ‘date’,
‘order’ => ‘DESC’,
‘include’ => array(),
‘exclude’ => array(),
‘meta_key’ => ”,
‘meta_value’ => ”,
‘suppress_filters’ => true,));
while($posts->have_posts()) :$posts->the_post(); ?>-
<tr>
<td><?php the_title();?></td>
<td><?php the_date();?></td>
<td><button>“>???????</button></td>
</tr>
<?php endwhile; ?>
I want to post with “routine” post_type and It has 2 categories named “Class Routine” and “Exam Routine” basically both of these 2 category has different page so I need post with category id. But I could not show it.
Someone help me with this. I also want to add downloadable upload file option too.The page I need help with: [log in to see the link]
-
<tr>
- The topic ‘WordPress Custom Post show with category id’ is closed to new replies.