I would like to create a blank page, which is used to list out the product by the category , so far I have found some code like this:
$args = array( 'post_type' => 'product', 'posts_per_page' => 100, 'product_cat' => 'hot-deals');
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
global $product;
var_dump($product);
endwhile;
wp_reset_query();
The problems is:
1) Where should I place the code? I tried adding it in the backend->add new page, I installed some plugin that allow me to insert PHP code, tested that the code is fine.
However I would like to generate an XML from the result. If I simply create a page, it will include the header and footer in it.
How to create a blank page and at the same time can use the Classes/ functions from woocommerce?
e.g.
my-domain.com/rss