Skip to content

Instantly share code, notes, and snippets.

/single-autoclave.php Secret

Created Jun 7, 2012
Embed
What would you like to do?
Single Autoclave Product Page Template
<?php
/**
* Template Name: Single Autoclave Product
*
* A custom page template for displaying each Autoclave product
*
* The "Template Name:" bit above allows this to be selectable
* from a dropdown menu on the edit page screen.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
get_header(); ?>
<?php global $autoclave_meta; ?>
<?php global $wpalchemy_media_access; ?>
<?php $args = array( 'post_type' => 'autoclave', 'autoclave_tax' => 'autoclave_meta', 'numberposts' => -1 ); ?>
<?php $posts = get_posts( $args ); ?>
<?php $autoclave_info = $autoclave_meta->the_meta(); ?>
<div class="contentcontainer">
<h1 class="entry-title"><p><?php echo get_the_title(); ?></p></h1>
<div class="content size_one">
<span class="product_image"><span style="width: 282px; height: 382px; float: left; background-image: url(<?php echo $autoclave_info['imgurl'] ?>);"></span></span>
</div>
<div class="content size_one">
<h3 class="column_heading">about the <?php echo get_the_title(); ?></h3>
<div class="column_text"><p><?php echo $autoclave_info['description'] ?></p></div>
<h3 class="column_heading">more information</h3>
<div id="brochureContent"><p>Brochures<br>
<?php while($autoclave_meta->have_fields_and_multi('docs')): ?>
<?php $brochureurl = $autoclave_meta->the_field('brochureurl'); ?>
<?php $brochuretitle = $autoclave_meta->the_field('brochuretitle'); ?>
<a href="<?php echo $brochureurl ?>"><?php echo $brochuretitle ?></a></p>
<?php endwhile; ?>
<p><?php echo get_the_title(); ?> datasheets<br>
<?php while($autoclave_meta->have_fields('datasheet')): ?>
<a href="<?php echo $autoclave_info['datasheeturl'] ?>" title="download: <?php echo $autoclave_info['datasheettitle'] ?>"><?php echo $autoclave_info['datasheetitle'] ?></a></div>
<?php endwhile; ?>
</div>
<div class="content size_one">
<h3 class="column_heading">key features &amp; options</h3>
<div class="column_text"><div _wfname="pageContent_Column3" _wftype="text"><?php echo $autoclave_info['features'] ?></div>
</div>
</div>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment