Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Products
- Author: Mehedi
- */
- get_header();
- ?>
- <div class="container td-page-wrap">
- <div class="row">
- <div class="span12">
- <div class="gdgt-wrap">
- <div class="container-fluid"
- <div id="content" class="row-fluid">
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- <!--PRODUCT INTRO STARTS-->
- <div class="product-box-wrap">
- <?php the_post_thumbnail('medium', array('class' => 'product-img')); ?>
- <h2 class="product-title"><?php echo the_title();?></h2>
- <p class="product-info">Released on <?php echo the_time('d-m-Y');?> by <?php echo get_post_meta($post->ID, 'company', true); ?></p>
- <div class="product-description"><?php echo get_post_meta($post->ID, 'desc', true); ?></div>
- </div><br>
- <!--PRODUCT INTRO ENDS-->
- <!--PRODUCT INFO STARTS-->
- <div class="info-container">
- <!--PRODUCT OVERVIEW STARTS-->
- <div class="product-overview"><br>
- <h4 class="gdgt-title"><span>OVERVIEW</span></h4>
- <?php the_content();?>
- </div>
- <!--PRODUCT OVERVIEW ENDS-->
- <!--PRODUCT PRICE STARTS-->
- <div class="product-price">
- <br/><p>AVAILABLE FOR</p>
- <h1><?php echo get_post_meta($post->ID, 'price', true); ?></h1>
- <!--PRODUCT PRICE ENDS-->
- </div>
- <!--PRODUCT INFO ENDS-->
- <!--ABOUT PART STARTS-->
- <div class="about-part">
- <!--ADVERTISEMENT STARTS-->
- <div class="advertisment">
- <div class="td-visible-desktop">
- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
- <!-- inlinelomabad -->
- <ins class="adsbygoogle"
- style="display:inline-block;width:728px;height:90px"
- data-ad-client="ca-pub-2231092370359736"
- data-ad-slot="8073637401"></ins>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script>
- </div>
- <div class="td-visible-tablet-l">
- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
- <!-- inlinelomabad -->
- <ins class="adsbygoogle"
- style="display:inline-block;width:728px;height:90px"
- data-ad-client="ca-pub-2231092370359736"
- data-ad-slot="8073637401"></ins>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script>
- </div>
- <div class="td-visible-tablet-tp">
- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
- <!-- PRODUCT -->
- <ins class="adsbygoogle"
- style="display:inline-block;width:468px;height:60px"
- data-ad-client="ca-pub-2231092370359736"
- data-ad-slot="8827267409"></ins>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script>
- </div>
- <div class="td-visible-phone">
- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
- <!-- mobile -->
- <ins class="adsbygoogle"
- style="display:inline-block;width:320px;height:50px"
- data-ad-client="ca-pub-2231092370359736"
- data-ad-slot="1304000600"></ins>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script>
- </div>
- </div>
- <!--ADVERTISEMENT ENDS-->
- <!--PRODUCT SPECIFICATIONS STARTS-->
- <div id="basic-specs"><br>
- <h4 class="gdgt-title"><span>SPECIFICATIONS</span></h4>
- <?php
- $p_type= get_post_meta($post->ID, 'p_type', true);
- if ($p_type == "hardware") {
- echo "<table class='specs'>";
- echo"<tr class='odd'>";
- echo"<td class='specs'>Type</td>";
- echo"<td class='specs'>" . get_post_meta($post->ID, 'h_type', true) . "</td>";
- echo"</tr>";
- echo"<tr class='odd'>";
- echo"<td class='specs'>Operating System</td>";
- echo"<td class='specs'>" . get_post_meta($post->ID, 'h_os', true) . "</td>";
- echo"</tr>";
- echo"<tr class='odd'>";
- echo"<td class='specs'>Camera</td>";
- echo"<td class='specs'>" . get_post_meta($post->ID, 'h_camera', true) . "</td>";
- echo"</tr>";
- echo"<tr>";
- echo"<td class='specs'>Screen Size</td>";
- echo"<td class='specs'>" . get_post_meta($post->ID, 'h_screen', true) . "</td>";
- echo"</tr>";
- echo"<tr>";
- echo"<td class='specs'>Internal Storage</td>";
- echo"<td class='specs'>" . get_post_meta($post->ID, 'h_storage', true) . "</td>";
- echo"</tr>";
- echo"<tr class='odd'>";
- echo"<td class='specs'>Talk Time</td>";
- echo"<td class='specs'>" . get_post_meta($post->ID, 'h_talk_time', true) . "</td>";
- echo"</tr>";
- echo"<tr class='odd'>";
- echo"<td class='specs'>Dimensons</td>";
- echo"<td class='specs'>" . get_post_meta($post->ID, 'h_dimensions', true) . "</td>";
- echo"</tr>";
- echo"<tr class='odd'>";
- echo"<td class='specs'>Weight</td>";
- echo"<td class='specs'>" . get_post_meta($post->ID, 'h_weight', true) . "</td>";
- echo"</tr>";
- echo"<tr>";
- echo"<td class='specs'>Released</td>";
- echo"<td class='specs'>" . get_post_meta($post->ID, 'p_released', true) . "</td>";
- echo"</tr>";
- echo"<tr>";
- echo"<td class='specs'>Carriers</td>";
- echo"<td class='specs'>" . get_post_meta($post->ID, 'h_carriers', true) . "</td>";
- echo"</tr>";
- echo"</table>";
- }
- elseif ($p_type == "software") {
- echo "<table class='specs'>";
- echo"<tr>";
- echo"<td class='specs'>Software Type</td>";
- echo"<td class='specs'>" . get_post_meta($post->ID, 's_type', true) . "</td>";
- echo"</tr>";
- echo"<tr>";
- echo"<td class='specs'>Software Version</td>";
- echo"<td class='specs'>" . get_post_meta($post->ID, 's_type_version', true) . "</td>";
- echo"</tr>";
- echo"<tr>";
- echo"<td class='specs'>Released</td>";
- echo"<td class='specs'>" . get_post_meta($post->ID, 'p_released', true) . "</td>";
- echo"</tr>";
- echo"</table>";
- }
- ?>
- </div>
- <!--PRODUCT SPECIFICATIONS ENDS-->
- <!--ABOUT COMPANY STARTS-->
- <div class="about-company"><br>
- <div>
- <h4 class="gdgt-title"><span>ABOUT <?php echo get_post_meta($post->ID, 'company', true); ?></span></h4>
- </div>
- <p><?php echo get_post_meta($post->ID, 'about_company', true);?></p>
- </div>
- <!--ABOUT COMPANY ENDS-->
- <!--ABOUT PART ENDS-->
- <?php
- /** Admin Slug Function */
- function gdgt_post_slug() {
- $post_data = get_post($post->ID, ARRAY_A);
- $slug = $post_data['post_name'];
- return $slug;
- }
- ?>
- </div>
- <!--MORE INFO STARTS-->
- <div class="last">
- </div>
- <!--MORE INFO ENDS-->
- <!--NOT IMPORTANT STARTS-->
- <div class="post" id="post-<?php the_ID(); ?>"><div class="entry" style="clear:both;"></div></div>
- <?php endwhile; else: ?>
- <p>Sorry, no posts matched your criteria.</p>
- <?php endif; ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement