• 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

    New install custom Loop: (DOESN’T WORK)
    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.
    • This topic was modified 8 years, 3 months ago by jnati.

    The page I need help with: [log in to see the link]

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