File: /home/RaviMohan/sdrshilajit.com/web/wp-content/themes/atraxis/single-products.php
<?php
/**
* The default template for displaying content. Used for both single and index/archive/search.
*
* @package WordPress
* @subpackage Klasik
* @since Klasik 1.0
*/
global $post, $more;
$more = 0;
get_header();
/* Collect all product data from meta */
$botanical_name = get_post_meta( get_the_ID(), 'botanical_name', true );
$english_name = get_post_meta( get_the_ID(), 'english_name', true );
$plant_parts_used = get_post_meta( get_the_ID(), 'plant_parts_used', true );
$description = get_post_meta( get_the_ID(), 'description', true );
/* Replace \n\r or \r with </li><li> in traditional_uses */
$traditional_uses = get_post_meta( get_the_ID(), 'traditional_uses', true );
$pharmacology = get_post_meta( get_the_ID(), 'pharmacology', true );
$marker_constituents = get_post_meta( get_the_ID(), 'marker_constituents', true );
/* All four images */
$more_images_1 = get_post_meta( get_the_ID(), 'more_images_1', true );
$more_images_2 = get_post_meta( get_the_ID(), 'more_images_2', true );
$more_images_3 = get_post_meta( get_the_ID(), 'more_images_3', true );
$more_images_4 = get_post_meta( get_the_ID(), 'more_images_4', true );
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="articlecontainer">
<div class="product">
<h1 class="posttitle">
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'klasik' ), the_title_attribute( 'echo=0' ) ); ?>" data-rel="bookmark"><?php the_title(); ?></a>
</h1>
<div class="product-details">
<div class="product-images">
<ul>
<?php if ($more_images_1) echo "<li><img src='$more_images_1' /></li>"; ?>
<?php if ($more_images_2) echo "<li><img src='$more_images_2' /></li>"; ?>
<?php if ($more_images_3) echo "<li><img src='$more_images_3' /></li>"; ?>
<?php if ($more_images_4) echo "<li><img src='$more_images_4' /></li>"; ?>
</ul>
</div>
<div class="separator line"><div class="icon"></div></div>
<div class="product-specifications">
<table>
<tbody>
<?php if ($botanical_name) echo "<tr><td class='table-column-head'>Botanical Name</td><td>$botanical_name</td></tr>"; ?>
<?php if ($english_name) echo "<tr><td class='table-column-head'>English Name</td><td>$english_name</td></tr>"; ?>
<?php if ($plant_parts_used) echo "<tr><td class='table-column-head'>Plant Part(s) Used</td><td>$plant_parts_used</td></tr>"; ?>
<?php if ($pharmacology) echo "<tr><td class='table-column-head'>Pharmacology</td><td>$pharmacology</td></tr>"; ?>
<?php if ($marker_constituents) echo "<tr><td class='table-column-head'>Marker Constituents</td><td>$marker_constituents</td></tr>"; ?>
<?php if ($botanical_name) echo "<tr><td class='table-column-head'>Botanical Name</td><td>$botanical_name</td></tr>"; ?>
</tbody>
</table>
</div>
<div class="separator line"><div class="icon"></div></div>
<h2>Description</h2>
<p class="product-description">
<?php echo $description; ?>
</p>
<div class="separator line"><div class="icon"></div></div>
<h2>Traditional Uses</h2>
<p>
<ul>
<li>
<?php echo $traditional_uses; ?>
</li>
</ul>
</p>
<div class="separator line"><div class="icon"></div></div>
<div class="product-tags half left">
<h2>Product Uses</h2>
<ul>
<li><a href="#">Uses</a></li>
</ul>
</div>
<div class="product-tags half right">
<h2>Product Families</h2>
<ul>
<li><a href="#">Family</a></li>
</ul>
</div>
<div style="clear:both;"></div>
</div>
</div>
</div>
</article><!-- end post -->
<div class="clear"></div><!-- clear float -->
<?php get_footer(); ?>