I’m trying to get my main content inside the class of “main”. I made front-page.php and a second navbar below. The main is containing that content here
I would like to get it wrapping around my content.php & the rest of my custom content-*.php files.
Here is my front-page.php:
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('templates/page', 'header'); ?>
<?php get_template_part('templates/content', 'page'); ?>
<?php endwhile; ?>
<div class="m-secondary-navigation">
<nav class="navbar navbar-default" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand sec-brand" href="#">Healthy Futures <small>The Cooking with Kids Blog</small></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse nav-collapse-secondary" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav m-secondary-anchor">
<li class="active"><a href="#" class="sec-nav-box" data-filter=".news">News</a></li>
<li class="active"><a href="#" class="sec-nav-box" data-filter=".video">Video</a></li>
<li class="active"><a href="#" class="sec-nav-box" data-filter=".gallery">Gallery</a></li>
<li class="active"><a href="#" class="sec-nav-box" data-filter=".recipe">Recipes</a></li>
<li class="active"><a href="#" class="sec-nav-box" data-filter=".quote">Quotes</a></li>
</ul>
<section class="m-lg-search">
<div class="input-group">
<input type="text" class="form-control">
<span class="input-group-addon dashicons dashicons-search"></span>
</div>
</section> <!-- ending for lg nav -->
</div> <!-- /.navbar-collapse -->
</nav>
</div> <!-- end of navigation container -->
<section class="m-md-search">
<div class="input-group">
<input type="text" class="form-control">
<span class="input-group-addon dashicons dashicons-search"></span>
</div>
<?//php get_search_form(true); ?>
</section> <!-- ending for md nav -->
<!-- </div> end of column
--></div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 infinite-scroll">
<?php
$args = array(
'post_type' => 'post',
'post_per_page' => 10
);
?>
<?php
$the_query = new WP_Query( $args ); ?>
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<?php get_template_part('templates/content', ( 'recipe' == get_post_type() ? 'recipe' : get_post_format() )); ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php else: ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
Thanks for any help!