Title: Block not displaying after second loop.
Last modified: August 21, 2016

---

# Block not displaying after second loop.

 *  Resolved [iamthez](https://wordpress.org/support/users/iamthez/)
 * (@iamthez)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/block-not-displaying-after-second-loop/)
 * Simply put, this works:
 *     ```
       <div id="content-1">
       			<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
       					<h1><?php the_content();?></h1>
       			<?php endwhile; ?>
   
       		</div>
   
       		<div id="content-2">
       			<?php the_block('Guest Lectures'); ?>
       		</div>
   
       		<div id="sub-pages">
       			<?php
       			$query = 'post_type=page&post_parent=9&order=ASC';
       			$queryObject = new WP_Query($query);
       			// The Loop...
       			if ($queryObject->have_posts()) {
       				while ($queryObject->have_posts()) {
       					$queryObject->the_post(); ?>
   
       				<h4><?php the_title(); ?></h4>
       				<?php the_excerpt(); ?>
   
       			<?php } } ?>
       ```
   
 * And this does not:
 *     ```
       <div id="content-1">
       			<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
       					<h1><?php the_content();?></h1>
       			<?php endwhile; ?>
   
       		</div>
   
       		<div id="sub-pages">
       			<?php
       			$query = 'post_type=page&post_parent=9&order=ASC';
       			$queryObject = new WP_Query($query);
       			// The Loop...
       			if ($queryObject->have_posts()) {
       				while ($queryObject->have_posts()) {
       					$queryObject->the_post(); ?>
   
       				<h4><?php the_title(); ?></h4>
       				<?php the_excerpt(); ?>
   
       			<?php } } ?>
   
       		<div id="content-2">
       			<?php the_block('Guest Lectures'); ?>
       		</div>
       ```
   
 * Any ideas?
 * [http://wordpress.org/extend/plugins/multiple-content-blocks/](http://wordpress.org/extend/plugins/multiple-content-blocks/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Trendwerk](https://wordpress.org/support/users/trendwerk/)
 * (@trendwerk)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/block-not-displaying-after-second-loop/#post-3653776)
 * You should reset to the main query after your custom loop. Look at [http://codex.wordpress.org/Function_Reference/wp_reset_query](http://codex.wordpress.org/Function_Reference/wp_reset_query)
   for more info.

Viewing 1 replies (of 1 total)

The topic ‘Block not displaying after second loop.’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/multiple-content-blocks.svg)
 * [Multiple content blocks](https://wordpress.org/plugins/multiple-content-blocks/)
 * [Support Threads](https://wordpress.org/support/plugin/multiple-content-blocks/)
 * [Active Topics](https://wordpress.org/support/plugin/multiple-content-blocks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multiple-content-blocks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multiple-content-blocks/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Trendwerk](https://wordpress.org/support/users/trendwerk/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/block-not-displaying-after-second-loop/#post-3653776)
 * Status: resolved