taxonomy=qqatt&tag_ID=17&post_type=qqattributei want wp query of above data
To retrieve the data using a WP_Query, you can use the following code:
$args = array(
'taxonomy' => 'qqatt',
'tag_id' => 17,
'post_type' => 'qqattribute'
);
$query = new WP_Query( $args );
if( $query->have_posts() ) {
while( $query->have_posts() ) {
$query->the_post();
// Display post content or perform any other actions
}
} else {
// No posts found
}
// Restore original post data
wp_reset_postdata();
Make sure to modify and include this code within a custom WordPress template or theme file. Replace the comment // Display post content or perform any other actions with the necessary code to handle the retrieved posts
原文地址: https://www.cveoy.top/t/topic/iOMZ 著作权归作者所有。请勿转载和采集!