Get custom post query problem
-
hi i made a custom post type products.. now i want to show all of the custom posts in a single page..want to link all custom posts in a page
i made a product-template.php template file and tried this query
<?php
$args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 10 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
the_title();
echo ‘<div class=”entry-content”>’;
the_content();
echo ‘</div>’;
endwhile;
?>aftr using this query i’m getting the posts bt only text contents not all post layout including featured image and layout
please help me out i’m new
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Get custom post query problem’ is closed to new replies.