<?php $args = array( 'post_type' => 'product', 'posts_per_page' => 10, ); $loop = new WP_Query($args); while ( $loop->have_posts() ) { $loop->the_post(); ?> <div class="entry-content"> <?php the_title(); ?> <?php the_content(); ?> </div> <?php }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter