Title: Same Loop Code on Two Installs &#8211; One Doesn&#8217;t Work
Last modified: February 7, 2018

---

# Same Loop Code on Two Installs – One Doesn’t Work

 *  [jnati](https://wordpress.org/support/users/jnati/)
 * (@jnati)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/same-loop-code-on-two-installs-one-doesnt-work/)
 * I moved an old WP install to a new WP install, and am using the same loop coding,
   but it’s not working on the new install. Same Events Calendar plugin, just an
   updated version of WP is the only difference between the two installs.
 * Old install custom Loop: (WORKS)
    [https://www.artacademy.edu/new-site-2013/wordpress-news/events-list.php](https://www.artacademy.edu/new-site-2013/wordpress-news/events-list.php)
 * New install custom Loop: (DOESN’T WORK)
    [https://www.artacademy.edu/news-events/events-list.php](https://www.artacademy.edu/news-events/events-list.php)
 * **Loop Code:**
 *     ```
       <?php
       // Include WordPress
       define('WP_USE_THEMES', false);
       require('wp-blog-header.php');?>
   
       <link rel="stylesheet" type="text/css" href="/css/events-list.css">
   
       		<?php
               global $post;
   
               $get_posts = tribe_get_events(array('tribe_events_cat'=>'aac-events', 'posts_per_page'=>6, 'eventDisplay'=>'upcoming'));
   
               foreach($get_posts as $post) { setup_postdata($post);?>
   
                       <?php if ( have_posts() ) { ?>
   
                               <a href="<?php the_permalink(); ?>" class="eventlinks">
   
   
                                 <?php the_post_thumbnail('news-grid'); ?>
   
       					    <?php echo tribe_get_start_date( $post->ID, false, 'm/d/y' ); ?>  <?php the_title(); ?>
   
                               <hr /> 
   
                          </a> 
                         <?php } else { ?>  
                       <?php } ?>
   
                   <?php } //endforeach ?>
                   <?php wp_reset_query(); ?>            
   
        <div style="clear:both;"></div>
       ```
   
 * Any ideas on why it’s not loading the wp-blog-header ? I assume that’s the problem.
   I have had file path issues with requiring the wp-blog-header. Let me know what
   I’m doing wrong.
    -  This topic was modified 8 years, 3 months ago by [jnati](https://wordpress.org/support/users/jnati/).
    -  This topic was modified 8 years, 3 months ago by [jnati](https://wordpress.org/support/users/jnati/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsame-loop-code-on-two-installs-one-doesnt-work%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘Same Loop Code on Two Installs – One Doesn’t Work’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [jnati](https://wordpress.org/support/users/jnati/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/same-loop-code-on-two-installs-one-doesnt-work/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
