below i my code i am unable to get **Post id and catgory**
, what i am missing please guide me for that
<
?php
query_posts(array(
'post_type' => 'product',
) );
while (have_posts()) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<p><?php echo the_content(); ?></p>
<p>POST id:---><?php get_the_ID();?></p>
<p>Category:---><?php get_the_ID();?></p>
<br />--------------</br>
<?php endwhile;
The post type, or post format, is actually a taxonomy, so you’ll have to use WP_Query to do it.
Something along the lines of: