-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Step 2.2: Customize product detail page
- Loading branch information
1 parent
4cb5515
commit 440286e
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
get_header(); ?> | ||
|
||
<div id="primary" class="content-area"> | ||
<main id="main" class="site-main" role="main"> | ||
<?php | ||
while ( have_posts() ) : the_post(); | ||
$id = get_the_ID(); | ||
?> | ||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | ||
<header class="entry-header"> | ||
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> | ||
</header><!-- .entry-header --> | ||
|
||
<?php twentysixteen_post_thumbnail(); ?> | ||
|
||
<div class="entry-content"> | ||
<?php | ||
the_content(); | ||
?> | ||
</div> | ||
<div> | ||
price: <strong><?php echo get_post_meta($id, 'price')[0]; ?>$</strong> <br /> | ||
inventory: <strong><?php echo get_post_meta($id, 'inventory')[0]; ?> left</strong> | ||
</div> | ||
|
||
<div class="snipcart-button-wrapper"> | ||
</article> | ||
<?php | ||
// End of the loop. | ||
endwhile; | ||
?> | ||
|
||
</main><!-- .site-main --> | ||
|
||
<?php get_sidebar( 'content-bottom' ); ?> | ||
|
||
</div><!-- .content-area --> | ||
|
||
<?php get_sidebar(); ?> | ||
<?php get_footer(); ?> |