foreach ($movies as $post) { setup_postdata($post); if ('1' == $headbox_enable) { echo WPMOLY_Movies::movie_content(); } else { ?> <div id="post-<?php the_ID(); ?> " class="wpmoly movies archives movie"> <h2><?php the_title(); ?> </h2> <?php echo WPMOLY_Movies::movie_vintage_content(); ?> </div> <?php } } wp_reset_postdata(); } else { ?> <h5><?php _e('This is somewhat embarrassing, isn’t it?', 'wpmovielibrary'); ?> </h5> <p><?php _e('We could’t find any movie matching your criteria.', 'wpmovielibrary'); ?>