Advertisement
Guest User

Untitled

a guest
Nov 28th, 2013
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.35 KB | None | 0 0
  1. <?php
  2. /**
  3. * Template Name: Products VPS Brevini Mobile Valves
  4. */
  5.  
  6. get_header();
  7. the_post();
  8.  
  9. // Get 'monoblock' posts
  10. $products_mono_posts = get_posts( array(
  11. 'post_type' => 'post',
  12. 'posts_per_page' => -1, // Unlimited posts
  13. 'orderby' => 'prod_order', // Order alphabetically by name
  14. 'order' => 'Asc',
  15. 'brand' => 'vps-brevini' ,
  16. 'genre' => 'mobile-valves',
  17. 'section' => 'monoblock-valves',
  18. ) );
  19.  
  20.  
  21. // Get 'modular' posts
  22. $products_modular_posts = get_posts( array(
  23. 'post_type' => 'post',
  24. 'posts_per_page' => -1, // Unlimited posts
  25. 'orderby' => 'prod_order', // Order alphabetically by name
  26. 'order' => 'Asc',
  27. 'brand' => 'vps-brevini' ,
  28. 'genre' => 'mobile-valves',
  29. 'section' => 'modular-valves',
  30. ) );
  31.  
  32.  
  33.  
  34. ?>
  35.  
  36.  
  37.  
  38. <div id="primary" class="content-area wrapper">
  39. <div id="content" class="site-content" role="main">
  40. <header class="entry-header">
  41. <h1 class="entry-title"><?php the_title(); ?></h1>
  42.  
  43.  
  44. <div class="entry-content">
  45. <?php the_content(); ?>
  46. <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
  47. </div><!-- .entry-content -->
  48. <div class="intro">
  49.  
  50.  
  51. </div>
  52. </header>
  53.  
  54. <article class="col-sm-6">
  55.  
  56. <?php the_field('modular_valves_text'); ?>
  57. <div class="prod-divide">
  58.  
  59. <?php if ( $products_mono_posts ):
  60.  
  61. foreach ( $products_mono_posts as $post ):
  62. setup_postdata($post);
  63.  
  64.  
  65. ?>
  66. <div class="products equalpad">
  67.  
  68.  
  69.  
  70. <?php if ( $thumb_src = get_field('product_image') ): ?>
  71. <img src="<?php echo $thumb_src; ?>" alt="<?php the_title(); ?>, <?php the_field('team_position'); ?>" class="product-img">
  72. <?php endif; ?>
  73. <span class="prod-title"><span class="triangle-bottomright">&nbsp;</span>
  74. <span class="prod-title-body"><?php if ( $prod_src = the_title() ): echo $prod_src; endif; ?></span>
  75. <span class="triangle-topleft">&nbsp;</span></span>
  76. <h5>Basic Info</h5>
  77. <?php if ( $displacement = get_field('displacement_cc/rev') ): ?>
  78. <b>Displacement cc/rev:</b> <span><?php echo $displacement; ?></span><br/>
  79. <?php endif; ?>
  80. <?php if ( $widths = get_field('gear_widths') ): ?>
  81. <b>Gear Widths:</b> <span><?php echo $widths; ?></span><br/>
  82. <?php endif; ?>
  83. <?php if ( $psi = get_field('max_psi_/_bar') ): ?>
  84. <b>Max PSI / BAR:</b> <span><?php echo $psi; ?></span><br/>
  85. <?php endif; ?>
  86. <?php if ( $rpm = get_field('rpm') ): ?>
  87. <b>RPM:</b> <span><?php echo $rpm; ?></span><br/>
  88. <?php endif; ?>
  89. <?php if ( $gpm = get_field('l_/_min_/_gpm') ): ?>
  90. <b>L / MIN / GPM:</b> <span><?php echo $gpm; ?></span><br/>
  91. <?php endif; ?>
  92. <?php if ( $sections = get_field('max_sections_required') ): ?>
  93. <b>Max Sections Required:</b> <span><?php echo $sections; ?></span><br/>
  94. <?php endif; ?>
  95. <div class="clear"></div>
  96.  
  97. <a href="<?php echo get_permalink( $post->ID ); ?>" class="more-info">More Info</a>
  98.  
  99.  
  100.  
  101.  
  102.  
  103. </div>
  104. <?php endforeach; ?><?php endif; ?>
  105. </div>
  106.  
  107.  
  108. <div class="clear"></div>
  109. </article><!-- /.profile -->
  110. <article class="col-sm-6">
  111.  
  112. <?php the_field('monoblock_valves_text'); ?>
  113.  
  114. <div class="clear"></div>
  115. <div class="prod-divide">
  116.  
  117.  
  118. <?php if ( $products_modular_posts ):
  119.  
  120. foreach ( $products_modular_posts as $post ):
  121.  
  122. setup_postdata($post);
  123.  
  124.  
  125. ?>
  126. <div class="products equalpad">
  127.  
  128.  
  129.  
  130. <?php if ( $thumb_src = get_field('product_image') ): ?>
  131. <img src="<?php echo $thumb_src; ?>" alt="<?php the_title(); ?>, <?php the_field('team_position'); ?>" class="product-img">
  132. <?php endif; ?>
  133. <span class="prod-title"><span class="triangle-bottomright">&nbsp;</span>
  134. <span class="prod-title-body"><?php if ( $prod_src = the_title() ): echo $prod_src; endif; ?></span>
  135. <span class="triangle-topleft">&nbsp;</span></span>
  136. <h5>Basic Info</h5>
  137. <?php if ( $displacement = get_field('displacement_cc/rev') ): ?>
  138. <b>Displacement cc/rev:</b> <span><?php echo $displacement; ?></span><br/>
  139. <?php endif; ?>
  140. <?php if ( $widths = get_field('gear_widths') ): ?>
  141. <b>Gear Widths:</b> <span><?php echo $widths; ?></span><br/>
  142. <?php endif; ?>
  143. <?php if ( $psi = get_field('max_psi_/_bar') ): ?>
  144. <b>Max PSI / BAR:</b> <span><?php echo $psi; ?></span><br/>
  145. <?php endif; ?>
  146. <?php if ( $rpm = get_field('rpm') ): ?>
  147. <b>RPM:</b> <span><?php echo $rpm; ?></span><br/>
  148. <?php endif; ?>
  149. <?php if ( $gpm = get_field('l_/_min_/_gpm') ): ?>
  150. <b>L / MIN / GPM:</b> <span><?php echo $gpm; ?></span><br/>
  151. <?php endif; ?>
  152. <?php if ( $sections = get_field('max_sections_required') ): ?>
  153. <b>Max Sections Required:</b> <span><?php echo $sections; ?></span><br/>
  154. <?php endif; ?>
  155. <div class="clear"></div>
  156.  
  157. <a href="<?php echo get_permalink( $post->ID ); ?>" class="more-info">More Info</a>
  158.  
  159.  
  160.  
  161. </div>
  162. <?php endforeach; ?><?php endif; ?>
  163. </div>
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171. <div class="clear"></div>
  172.  
  173. <div class="clear"></div>
  174. </article><!-- /.profile -->
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181. <div class="clear"></div>
  182. </div><!-- #content -->
  183. </div><!-- #primary -->
  184.  
  185.  
  186.  
  187.  
  188.  
  189. <?php get_sidebar(); ?><div class="clear"></div>
  190. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement