What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-09-07 19:10:02
wordpress have_posts not working
//As per my understandings of your issue: //You are not querying posts you need to show. Use wp_query() to query your posts before loop. $wp_query = new WP_Query(array('posts_per_page'=>-1)); while ($wp_query->have_posts()) : $wp_query->the_pos... Add solution -
Other 2021-09-04 07:24:03
custom post type query loop wordpress
<?php $loop = new WP_Query( array( 'post_type' => 'yourposttypehere' // This is the name of your post type - change this as required, &... Add solution -
Other 2021-08-31 20:27:02
custom post type
<?php $args = array( 'post_type' => 'product', 'posts_per_page' => 10, ); $loop = new WP_Query($args); while ( $loop->have_posts() ) { $loop-... Add solution
Best helpers
Joker13
+5
Remmy Kasili
+5
Anand GV
+5
Manx rat
+5
Jokim
+5
Nitro2k01
+5
Letomkov
+5
Glob Cropper
+5