Results not being printed
-
06-11-2019 - |
سؤال
I am trying to run the following code, which i got from the site but i don't see any output.When i do print_r($product)
only then i get array back.
$args = array(
'post_type' => 'product',
'posts_per_page' => 4
);
$featured_query = new WP_Query( $args );
if ($featured_query->have_posts()) :
while ($featured_query->have_posts()) :
$featured_query->the_post();
$product = get_product( $featured_query->post->ID );
echo $product;
endwhile;
endif;
لا يوجد حل صحيح
لا تنتمي إلى wordpress.stackexchange