'product', 'posts_per_page' => -1 ); $loop = new WP_Query( $args ); // echo '
'.print_r($products, true).'
'; header("Content-type: text/xml"); echo ''; echo ''; if ( $loop->have_posts() ): while ( $loop->have_posts() ): $loop->the_post(); echo ''; echo ''; echo ''; echo '
'; echo ''; echo ''; endwhile; endif; wp_reset_postdata(); echo ''; // // echo "\n"; // echo "\n"; // // $posts = get_posts('post_type=product'); // // foreach($posts as $post){ // echo ''; // echo "\t" . $post->ID . "\n"; // // echo "\t" . $post->post_date . "\n"; // echo "\t\n"; // echo "\t" . esc_html(strip_tags($post->post_excerpt)) . "\n"; // echo ''; // } // // // echo ""; // exit; ?>