free-sample.php
1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?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(); ?>