• Hello everybody, i’m currently suffering from a problem where if i put a php code below one it wont display but when i put it above the code it works perfectly.

    I’m curious as to why it’s doing it and a to find a possible solution, the top code is to display the latest posts whilst the code at the bottom just displays an image for php, as mentioned they both work but any code i put below the Post one does not display

    <?php
    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query();
    $wp_query->query('posts_per_page=5'.'&paged='.$paged);
    while ($wp_query->have_posts()) : $wp_query->the_post();
    ?>
    
    <?php get_template_part( 'entry-main' ); ?>
    <?php comments_template(); ?>
    <?php endwhile; ?>
    <?php get_template_part( 'nav', 'below' ); ?>
    
    </section>
    </div>
    </div>
    
    <div id="moduleTwoRight">
    <div id="moduleTwoRightTitle">Tweets</div>
    <div id="moduleTwoRightText">
    Tweets go here<br><br>
    </div>
    <div id="moduleTwoRightFollow"><a href="https://twitter.com/EmpCharter">follow @hecharter on twitter</a></div>
    </div>
    
    <div style="clear:both"></div>
    
    <div id="moduleThreeTitle">Testimonials</div>
    <div id="moduleThreeText">
    
    <div id="testOne">
    
    <div id="testOneAnon"></div>
    <div id="testOneTestOne">
    <img src="<?php the_field('test_one_image'); ?>" alt="" />
    </div>
    
    </div>

    Would greatly appreciate the help

    Kind regards

    ~Matt

  • The topic ‘PHP not displaying underneath another’ is closed to new replies.