Woocommerce „Produkt des Tages“ „Product of the Day“
-
Hallo euch allen!
Ich bin gerade auf der Suche wie man jeden Tag ein anderes Produkt zeigen kann. Also momentan hab ich diese Code (siehe unten) und ich möchte gerne das das Produkt jeden Tag automatisch wechselt ohne das man jeden Tag ein neues Produkt aktivieren muss.
Vielen Dank!
Gruss
<?php $args = array( ‚post_type‘ => ‚product‘, ‚posts_per_page‘ => 1, ‚product_cat‘ => ‚coffee, brew-gear, merchandise‘ ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?> <div class=“row-home“ id=“boxRowHomeBottom“> post->ID ) ?>“> <?php woocommerce_show_product_sale_flash( $post, $product ); ?> <?php if (has_post_thumbnail( $loop->post->ID )) echo get_the_post_thumbnail($loop->post->ID, ’shop_catalog‘); else echo ‚Placeholder‚; ?> <div class=“home-two home-columns“ id=“boxRowHomeBottomTxt“> <div id=“hh“> <h2><?php echo __(„<!–:de–>Produkt des Tages:<!–:–><!–:en–>Product of the Day:<!–:–>“); ?></h2> post->ID ) ?>“> <h2><?php the_title(); ?></h2> </div> </div> </div> <?php endwhile; ?> <?php wp_reset_query(); ?>
Ansicht von 1 Antwort (von insgesamt 1)
Ansicht von 1 Antwort (von insgesamt 1)
- Das Thema „Woocommerce „Produkt des Tages“ „Product of the Day““ ist für neue Antworten geschlossen.