Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_template_part( 'header-blog' ); // different header / gives body class 'blog' ?>
- <div id="header-holder">
- <?php get_template_part( 'nav' ); // Navigation bar (nav.php) ?>
- </div>
- <div id="center">
- <div id="maincontainer" class="<?php echo get_the_title($ID) ?>">
- <div id="positioncontainer">
- <div id="content">
- <div id="leftcontent" class="home">
- realted product list to go here
- </div>
- <?php if (have_posts()) : ?>
- <?php while (have_posts()) : the_post();
- $custom = get_post_custom(get_the_ID()); // to gather custom meta ?>
- <div class="post" id="post-<?php the_ID(); ?>">
- <style type="text/css">
- div.product h3{
- background-color: <?php echo get_option('color'); ?>;
- }
- </style>
- <div id="copycontent" class="product">
- <div id="title">
- <h1>
- <?php
- $terms = wp_get_post_terms($post->ID,'productranges');
- foreach ($terms as $term) {
- echo $term->name;
- }
- ?>
- </h1>
- <h2>
- <?php
- $terms = wp_get_post_terms($post->ID,'productranges');
- foreach ($terms as $term) {
- echo $term->description;
- }
- ?>
- </h2>
- </div>
- <h3><?php the_title(); ?></h3>
- <div id="product-holder">
- <?php //Add featured image/thumbnails to page
- if ( has_post_thumbnail()) {
- $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'medium');
- echo '<div class="image-holder"> <div class="image-entry"> ';
- echo get_the_post_thumbnail($post->ID, 'medium');
- echo ' </div></div>';
- }
- ?>
- <?php the_content('Read the rest of this entry »'); ?>
- <div id="product-details">
- <h4 class="price">Ingredients:</h4>
- <p><?php echo $custom["ingredients"][0];?></p>
- <h4 class="price">Analysis:</h4>
- <p><?php echo $custom["analysis"][0];?></p>
- </div>
- </div>
- </div>
- </div>
- <div id="rightcontent" class="blog">
- <div id="allproducts">
- <?php
- if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Product Right Sidebar')) : // right content
- ?>
- <?php
- endif;
- ?>
- </div>
- <div id="productprice">
- <h3> BUY ONLINE NOW </h3>
- <div class="price"><?php echo $custom["price"][0];?></div>
- </div>
- <?php
- $query_tax = array('taxonomy' => 'testimonials','field' => 'id','terms' => $query_cat);
- $args = array('tax_query'=>array($query_tax),'posts_per_page' => 1,'orderby' => 'rand','post_type' => 'testimonial', 'paged'=>$paged);
- $posts = query_posts ($args);?>
- <?php
- foreach ($posts as $post) : setup_postdata($post); ?>
- <h3><?php the_title(); ?></h3>
- <?php the_excerpt('<div class="readmore">'); ?><a href="/testimonials">read more...</a>
- <?php endforeach; ?>
- <?php
- //Reset Query
- wp_reset_query();?>
- </div>
- <?php endwhile; ?>
- <?php endif; ?>
- </div>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement