free-sample.php 1.68 KB
<?php
/**
 * The template for displaying the homepage.
 *
 * This page template will display any functions hooked into the `homepage` action.
 * By default this includes a variety of product displays and the page content itself. To change the order or toggle these components
 * use the Homepage Control plugin.
 * https://wordpress.org/plugins/homepage-control/
 *
 * Template name: Free Sample Template
 *
 * @package storefront
 */
/*
 * Created on : July 22, 2016, 9:15:42 AM
 * Author: ThuNgan

 */
remove_filter('the_content', 'wpautop');
get_header();
?>

<div id="free-sample-page" class="content-area">
    <main id="main" class="site-main" role="main">
        <div id="checkout_loader_img" class="hide"></div>
        <?php while (have_posts()) : the_post(); ?>

            <?php
            do_action('storefront_page_before');
            ?>

            <?php get_template_part('content', 'page'); ?>
            <?php
            /**
             * @hooked storefront_display_comments - 10
             */
            do_action('storefront_page_after');
            ?>

        <?php endwhile; // end of the loop. ?>

        <?php
        if (is_user_logged_in()) {
            $emailAddress = wp_get_current_user()->user_email;
            $firstName = wp_get_current_user()->user_firstname;
            ?>
            <input type="hidden" name="loginemail" value="<?php echo $emailAddress ?>" />
            <?php
            if ($emailAddress != $firstName) {
                ?>
                <input type="hidden" name="firstname" value="<?php echo $firstName ?>" />
                <?php
            }
        }
        ?>
    </main><!-- #main -->
</div><!-- #primary -->

<?php get_footer(); ?>