I created a query with arguments see blow. On the page I see an error in a loop
Notice undefined offset 1
Notice undefined offset 2
Notice undefined offset 3 and so on...
$args = array ( 'post_type' => 'catalog', 'post_status' => 'publish', ); $loop = new WP_Query( $args ); if ( $loop->have_posts() ) { while ( $loop->have_posts() ) { the_post(); echo get_the_title(); } }
I tried other arguments but this does not work.
- 'posts_per_page' => 4
Please who can help me?