Working with Custom Post Types | Plugin Developer Handbook | WordPress Developer Resources

PHOTO EMBED

Sat Nov 25 2023 10:05:09 GMT+0000 (Coordinated Universal Time)

Saved by @dmsearnbit #php

<?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
}
content_copyCOPY

https://developer.wordpress.org/plugins/post-types/working-with-custom-post-types/