Customization – Custom WooCommerce loop with "featured products" works offline but not online. What to do to make it work?

I want to create a product teaser section on my home page (home-page.php). Ideally, this section would act as a carousel. At the moment, however, I am trying to make the following code so that I upload it to my website.

The code I've put together below will be written directly into the "home-page.php" template. It works offline, but for some reason not online (does not appear at all).

Any ideas on how I can do this job? Any help appreciated!

4 & # 39; # 39 & post_type; => & # 39; product & # 39 ;, "post_status" => "Publish", & # 39; # 39 & tax_query; => array ( Array ( & # 39; taxonomy & # 39; => & # 39; product_visibility & # 39 ;, & # 39; field & # 39; => & # 39; name & # 39 ;, & # 39; terms & # 39; => & # 39; marked & # 39 ;, & # 39; operator & # 39; => & # 39; IN & # 39 ;, ) ) ); $ featured_product = new WP_Query ($ product_args); if ($ featured_product-> have_posts ()): Echo & # 39;
    & # 39 ;; while ($ featured_product-> have_posts ()): $ featured_product-> the_post (); global $ product;?> "Name"))); ?>
  • <a href = "">
    <img class = "ml-auto mr-auto" src = "http://wordpress.stackexchange.com/"old ="">

    <? php echo $ maerke. "
    ";?>

  • <? php endtime; Echo & # 39;
& # 39 ;; endif; wp_reset_query ();?>