Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $category = get_the_category();
- $dia = get_post_meta($post->ID, 'diameter', true);
- $duro = get_post_meta($post->ID, 'durometer', true);
- $thumb = get_the_post_thumbnail();
- $stylesheetdir = get_bloginfo('stylesheet_directory');
- if ($thumb) {
- $src_thmb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail', false, '' );
- $src_med = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'medium', false, '' );
- $src_large = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large', false, '' );
- $image_thmb = $src_thmb[0];
- $image_med = $src_med[0];
- $image_large = $src_large[0];
- } else {
- $image_thmb = $stylesheetdir.'/assets/img/no-image.png';
- $image_med = $stylesheetdir.'/assets/img/no-image.png';
- }
- if ( !is_single() ) { $image = $image_thmb; }
- else { $image = $image_med; }
- ?>
- <div class="wheelimg">
- <?php if ( !is_single() ) { ?>
- <a href="<?php the_permalink(); ?>" title="<?php echo $category[0]->name; echo ' '; the_title(); echo ' ('.$dia.'mm/'.$duro.'a)'; ?>">
- <img src="<?php echo $image_thmb; ?>" class="" alt="<?php echo $category[0]->name; echo ' '; the_title(); echo ' ('.$dia.'mm/'.$duro.'a)'; ?>" />
- </a>
- <?php } else { ?>
- <img src="<?php echo $image_med; ?>" class="" alt="<?php echo $category[0]->name; echo ' '; the_title(); echo ' ('.$dia.'mm/'.$duro.'a)'; ?>" />
- <?php } ?>
- </div>
- <?php if ( !is_single() ) { ?>
- <h2 class=""><?php echo $category[0]->name; echo ' '; the_title(); ?></h2>
- <?php } ?>
- <?php
- // include (TEMPLATEPATH . '/templates/wheel-specs.php');
- get_template_part('templates/wheel', 'specs');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement