Title: Custom post types in split loop
Last modified: August 21, 2016

---

# Custom post types in split loop

 *  [Fyn](https://wordpress.org/support/users/fyn/)
 * (@fyn)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/custom-post-types-in-splitted-loop/)
 * Hey everyone,
    I’ll get right to the point. My website is [brokenstars.de](http://brokenstars.de)
   and on the front page (index.php) there’s a loop that shows one bigger entry 
   at the top and three previews of the next ones. If you paginate it only shows
   four previews instead of a bigger entry on top. That’s how I wanted it and everything
   works perfectly, even the pagination. Here’s the code I’ve used in my loop:
 *     ```
       <?php
       $paged = $wp_query->get( 'paged' );
       if ( ! $paged || $paged < 2 ) :
   
       $args = array(
       	'post_type' => array('post','tutorials'),
        	'posts_per_page' => 1
       );
   
       $my_query = new WP_Query($args);
       	while ($my_query->have_posts()) : $my_query->the_post();
       		$do_not_duplicate = $post->ID;?>
   
       // Here's the stuff for the first entry
   
       <?php endwhile; endif;
       while (have_posts()) : the_post();
       	if( $post->ID == $do_not_duplicate ) continue; ?>
   
       // Here's the stuff for the next three entries
   
       <?php endwhile; ?>
       ```
   
 * You can see that I’ve tried to include my custom post type “tutorials”. If I 
   create an entirely new query like the first one with other arguments for the 
   three last entries the tutorials get shown but the pagination is broken and it
   will always show the last four entries if you paginate. But else, with the working
   code above it just doesn’t show the tutorials at all. Spelling mistakes are impossible,
   I’ve checked several times. It clearly recognizes the argument for posts per 
   page, but it just doesn’t get the post type argument.
 * Did I place it wrong? Or is there something else I have to consider?
    Thanks 
   for your help 🙂

The topic ‘Custom post types in split loop’ is closed to new replies.

## Tags

 * [multiple loops](https://wordpress.org/support/topic-tag/multiple-loops/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Fyn](https://wordpress.org/support/users/fyn/)
 * Last activity: [12 years, 12 months ago](https://wordpress.org/support/topic/custom-post-types-in-splitted-loop/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
