wp query custom post type

Solutions on MaxInterview for wp query custom post type by the best coders in the world

showing results for - "wp query custom post type"
Joana
13 Oct 2017
1  <?php    
2  	   $args = array(  
3      'post_type' => 'custom_type',
4      'post_status' => 'publish',
5      'posts_per_page' => 8, 
6      'orderby' => 'title', 
7      'order' => 'ASC', 
8          );
9
10  $loop = new WP_Query( $args ); 
11
12  while ( $loop->have_posts() ) : $loop->the_post(); 
13      print the_title(); 
14      the_excerpt(); 
15  endwhile;
16
17  wp_reset_postdata(); 
18  ?>
Giacomo
05 Mar 2017
1<?php
2$args = array(
3    'post_type'      => 'product',
4    'posts_per_page' => 10,
5);
6$loop = new WP_Query($args);
7while ( $loop->have_posts() ) {
8    $loop->the_post();
9    ?>
10    <div class="entry-content">
11        <?php the_title(); ?>
12        <?php the_content(); ?>
13    </div>
14    <?php
15}
16
Alex
05 Mar 2020
1//WordPress: Query a custom post type
2//For example, query all Case Study post types
3
4<?php query_posts('post_type=case_studies'); ?>
queries leading to this page
how to print the custom post typewp query custom post type contentget custom post type wp querywp query custom post type categorywp query get post typeswordpress php query custom post typepost type queryquery to get all custom post type posts wordpresswp get custom post type categorywp query custom post typewp query get post by post typequery a custom post in wordpresswordpress set query post typequery custom post type wordpresswp query post typewordpress query arguments post typescustom post type querycustom post type loopwordpress query on customer post typeget custom post type wordpresswordpress query for custom post typewp get custom post typequery custom post type by idwordpress wp query custom post typewordpress query to get posts of custom posttypewordpress get custom post typepost type wp queryquery custom post type wpwordpress query custom post type by categorywp get posts custom post typewp query post typewp query specific post typequery posts custom post typewp query post types all itemsquery custom post typewp query get custom post typeget custom post types wp querywordpress php custom post type querycustom post typewp query find post by post typewordpress query post custom typewordpress query post typewp query custom post type examplepost type query wordpresswp query custom post typewordpress custom post type querywordpress get custom post type data custom query to get custom post typewordpress query post type custom field valuewp code custom post type querywp get custom post typesquery wp database to return custom post type by idwp custom post type querywp query post typesget custom posty type querywp query custom post type not workingwordpress php query for custom post typewp query for custom post typewp query custom post type idget custom post typehow to query custom post type in wordpresswp query get custom post typewp query all post for typewordpress get custom post type postswordpress query postswordpress query custom post typeget custom post type querywp query custom postwordpress query of post typewp query for post typepopular post query custom post type wordpresswp query all custom post typecustom post type query wordpresswp post type quesrywordpress post query custom post typewp query custom post type