Title: additional loop within event-single
Last modified: August 31, 2016

---

# additional loop within event-single

 *  Resolved [mrjonnywood](https://wordpress.org/support/users/jwoodcreative/)
 * (@jwoodcreative)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/additional-loop-within-event-single/)
 * Hi, I’m trying to use multiple loops within event-single.php with no luck.
 * Essentially what I need to do is have the standard loop that pulls any single
   event in, but then use an if statement as follows:
 * if (is-particular-event-ID) {
    add a second loop to pull in a list from another
   custom post type (with a specific tag) }
 * Forgive the complete layman terms here, I’ve attempted this so far without the
   conditional if statement, just to try and output the second loop using a custom
   wp_query after the main loop has ended but I can’t even get that working.
 * I realise this isn’t 100% specific to Event Organiser but any help from anyone
   would be massively appreciated!
 * Thanks.
 * [https://wordpress.org/plugins/event-organiser/](https://wordpress.org/plugins/event-organiser/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Stephen Harris](https://wordpress.org/support/users/stephenharris/)
 * (@stephenharris)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/additional-loop-within-event-single/#post-7070071)
 * You can do:
 *     ```
       if ( 123 == get_the_iD() ) {
           $my_secondary_loop = new WP_Query(...);
           if( $my_secondary_loop->have_posts() ):
               while( $my_secondary_loop->have_posts() ): $my_secondary_loop->the_post();
                   //The secondary loop
               endwhile;
           endif;
           wp_reset_postdata();
       }
       ```
   
 * See [http://wordpress.stackexchange.com/a/50762/9364](http://wordpress.stackexchange.com/a/50762/9364)
   for more details and [https://codex.wordpress.org/Class_Reference/WP_Query](https://codex.wordpress.org/Class_Reference/WP_Query)
   for details on constructing your query.
 * Hope that helps!
 *  Thread Starter [mrjonnywood](https://wordpress.org/support/users/jwoodcreative/)
 * (@jwoodcreative)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/additional-loop-within-event-single/#post-7070196)
 * Took a while to get back on this – thanks. That’s been a good help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘additional loop within event-single’ is closed to new replies.

 * ![](https://ps.w.org/event-organiser/assets/icon-256x256.png?rev=978123)
 * [Event Organiser](https://wordpress.org/plugins/event-organiser/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/event-organiser/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/event-organiser/)
 * [Active Topics](https://wordpress.org/support/plugin/event-organiser/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/event-organiser/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/event-organiser/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [mrjonnywood](https://wordpress.org/support/users/jwoodcreative/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/additional-loop-within-event-single/#post-7070196)
 * Status: resolved