Override Blog pages show at most with get_posts
In your code example, you’re mixing two things. With get_posts() you’ll get an array of posts, which you can use in a custom loop. $args1 = array( ‘post_type’ => ‘wpcp-events’ ‘numberposts’ => -1, ); $events = get_posts($args1); if ( $events ) { foreach ( $events as $post ) { setup_postdata( $post ); // make Loop … Read more