Risultati Non in fase di stampa
-
06-11-2019 - |
Domanda
Sto cercando di eseguire il seguente codice, che ho ottenuto dal luogo ma non vedo alcun output. Quando lo faccio print_r($product)
Solo allora ricevo l'array.
$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;
Nessuna soluzione corretta
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a wordpress.stackexchange