i have created a custom post type named Books & i have a widget to access data from posts
i want to access data from regular posts & from Books
<?php
global $post;
$args = array(
'post_type' => ???,
'cat' => $category_id,
'posts_per_page' => '6',
);
$new_query = new WP_Query($args);
while ($new_query->have_posts()) : $new_query->the_post();
if(has_post_thumbnail( $post->ID )):
?>
i use this code to access the posts data
what need to be pass in ‘post_type’ to get data from Books & regular posts
Try this for the post_type portion: