<?php
/**
 * The template for displaying pages
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages and that
 * other "pages" on your WordPress site will use a different template.
 *
 * @package WordPress
 * @subpackage b'smart
 * @since b'smart_old_theme_by_Goldfish 1.0
 */

get_header(); ?>

<div id="primary" class="content-area">
	<main id="main" class="site-main" role="main">
        <hr>
        <?php if(is_page('bsmart-home') || is_front_page()) { ?>
            <?php $page = get_page_by_title('Banner Slider'); $page_id = $page->ID;?>
            <?php $post = get_page($id=$page_id); $content = apply_filters('the_content', $post->post_content); echo $content; ?>

            <?php $page = get_page_by_title('About'); $page_id = $page->ID;?>
            <?php $post = get_page($id=$page_id); $content = apply_filters('the_content', $post->post_content); the_title( '<h1 class="entry-title">', '</h1>' ); echo $content; ?>

            <?php $page = get_page_by_title('Services'); $page_id = $page->ID;?>
            <?php $post = get_page($id=$page_id); $content = apply_filters('the_content', $post->post_content); the_title( '<h1 class="entry-title">', '</h1>' ); echo $content; ?>

            <?php $page = get_page_by_title('Career'); $page_id = $page->ID;?>
            <?php $post = get_page($id=$page_id); $content = apply_filters('the_content', $post->post_content); the_title( '<h1 class="entry-title">', '</h1>' ); echo $content; ?>

            <?php $page = get_page_by_title('Gallery'); $page_id = $page->ID;?>
            <?php $post = get_page($id=$page_id); $content = apply_filters('the_content', $post->post_content); the_title( '<h1 class="entry-title">', '</h1>' ); echo $content; ?>

            <?php $page = get_page_by_title('News Room'); $page_id = $page->ID;?>
            <?php $post = get_page($id=$page_id); $content = apply_filters('the_content', $post->post_content); the_title( '<h1 class="entry-title">', '</h1>' ); echo $content; ?>

            <?php $page = get_page_by_title('Contact'); $page_id = $page->ID;?>
            <?php $post = get_page($id=$page_id); $content = apply_filters('the_content', $post->post_content); the_title( '<h1 class="entry-title">', '</h1>' ); echo $content; ?>

        <?php } ?>
        <?php // Retrieve only Pages and exclude About, links, contact, etc.
            //$args = array(       // set up arguments
            //'post_type' => 'page',              // Only Pages
            //'post__not_in' => array(2,9,5,12)   // Do NOT show postID 2,9,5,or 12
            //);
            //query_posts($args);   // execute the arguments
        ?>

        <hr>

		<?php
		// Start the loop.
		while ( have_posts() ) : the_post();

			// Include the page content template.
			get_template_part( 'template-parts/content', 'page' );

			// If comments are open or we have at least one comment, load up the comment template.
			if ( comments_open() || get_comments_number() ) {
				comments_template();
			}

			// End of the loop.
		endwhile;
		?>

	</main><!-- .site-main -->

	<?php get_sidebar( 'content-bottom' ); ?>

</div><!-- .content-area -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
