Menu icon Foundation
end if not calling

Hi there! I was hoping someone would be able to look at my code and see why, my end while and end if's are not working before calling the end of <main> and then the sidebar and footer. I've created a custom page template, and then I am using the JointsWP custom archive-loop-grid to call posts WP_Query'd by custom taxonomy field. The entire custom taxonomy's code is below:

<?php /* Template Name:Meals */ ?>
<?php get_header(); ?>
	
	<div id="content">
	
		<div id="archive-content" class="row">
		    
<main id="main" class="large-10 medium-12 large-push-2 columns" role="main">
                    <h1 class="custom-page-title">Meals</h1>
                            <h2>Breakfast</h2>
                                <body>MIY firmly believes breakfast is the most important meal of the day! However, we understand it can be tough to fit in a proper breakfast on a busy schedule. That’s why we’ve developed these clean easy, protein packed, on-the-go solutions to start your day off right.</body>
                <section class="archive-content">
                    <?php
                        $args = array(
                            'post_type' => 'recipe',
                            'tax_query' => array(
                                array(
                                    'taxonomy' => 'course',
                                    'field'    => 'slug',
                                    'terms'    => 'breakfast',
                                ),
                            ),
                        );
                        $query = new WP_Query( $args ); ?>
                    <?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
                            <?php get_template_part( 'parts/loop', 'archive-grid' ); ?>
                    <?php endwhile; ?>
                        <!-- end of the loop -->
                        <?php wp_reset_postdata(); ?>
                    <?php else : ?>
                            <?php get_template_part( 'parts/content', 'missing' ); ?>
                    <?php endif; ?>
                </section>
			</main> <!-- end #main -->

		    <?php get_sidebar(); ?>
		    
		</div> <!-- end #archive-content -->

	</div> <!-- end #content -->

<?php get_footer(); ?>

An image of what it page (makeitforyourself.com/meals/) currently looks like and where the issue is in the inspector:

What it's meant to look like (a working archive page):

Please let me know if you see any issues!

Thank you

custom page templatearchive gridconditional statement

Hi there! I was hoping someone would be able to look at my code and see why, my end while and end if's are not working before calling the end of <main> and then the sidebar and footer. I've created a custom page template, and then I am using the JointsWP custom archive-loop-grid to call posts WP_Query'd by custom taxonomy field. The entire custom taxonomy's code is below:

<?php /* Template Name:Meals */ ?>
<?php get_header(); ?>
	
	<div id="content">
	
		<div id="archive-content" class="row">
		    
<main id="main" class="large-10 medium-12 large-push-2 columns" role="main">
                    <h1 class="custom-page-title">Meals</h1>
                            <h2>Breakfast</h2>
                                <body>MIY firmly believes breakfast is the most important meal of the day! However, we understand it can be tough to fit in a proper breakfast on a busy schedule. That’s why we’ve developed these clean easy, protein packed, on-the-go solutions to start your day off right.</body>
                <section class="archive-content">
                    <?php
                        $args = array(
                            'post_type' => 'recipe',
                            'tax_query' => array(
                                array(
                                    'taxonomy' => 'course',
                                    'field'    => 'slug',
                                    'terms'    => 'breakfast',
                                ),
                            ),
                        );
                        $query = new WP_Query( $args ); ?>
                    <?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
                            <?php get_template_part( 'parts/loop', 'archive-grid' ); ?>
                    <?php endwhile; ?>
                        <!-- end of the loop -->
                        <?php wp_reset_postdata(); ?>
                    <?php else : ?>
                            <?php get_template_part( 'parts/content', 'missing' ); ?>
                    <?php endif; ?>
                </section>
			</main> <!-- end #main -->

		    <?php get_sidebar(); ?>
		    
		</div> <!-- end #archive-content -->

	</div> <!-- end #content -->

<?php get_footer(); ?>

An image of what it page (makeitforyourself.com/meals/) currently looks like and where the issue is in the inspector:

What it's meant to look like (a working archive page):

Please let me know if you see any issues!

Thank you