| 1 |
<?php |
| 2 |
/* |
| 3 |
Template Name: Item category template |
| 4 |
* <meta content="charset=UTF-8"> |
| 5 |
* @package Welcart |
| 6 |
* @subpackage Welcart Default Theme |
| 7 |
*/ |
| 8 |
get_header(); |
| 9 |
?> |
| 10 |
|
| 11 |
<div id="content" class="two-column"> |
| 12 |
<?php if (have_posts()) the_post(); ?> |
| 13 |
<h1 class="pagetitle"><?php the_title(); ?></h1> |
| 14 |
|
| 15 |
<div class="catbox"> |
| 16 |
<div class="post" id="<?php echo $post->post_name; ?>"> |
| 17 |
<?php the_content(); ?> |
| 18 |
|
| 19 |
<?php $paged = $wp_query->query_vars['paged']; ?> |
| 20 |
<?php $category_name = get_post_meta($post->ID, 'category_slug', true); ?> |
| 21 |
<?php $posts_per_page = get_post_meta($post->ID, 'posts_per_page', true); ?> |
| 22 |
<?php $order = get_post_meta($post->ID, 'order', true); ?> |
| 23 |
<?php query_posts('category_name=' . $category_name . '&status=post&paged=' . $paged . '&posts_per_page=' . $posts_per_page . '&order='. $order); ?> |
| 24 |
<div class="pagenavi"><?php posts_nav_link(' — ', __("« Previous page", 'usces'), __("next page »", 'usces')); ?></div> |
| 25 |
<div class="clearfix"> |
| 26 |
|
| 27 |
<?php if (have_posts()) : while (have_posts()) : the_post(); usces_the_item(); ?> |
| 28 |
|
| 29 |
<div class="thumbnail_box"> |
| 30 |
<div class="thumimg"><a href="<?php the_permalink() ?>"><?php usces_the_itemImage($number = 0, $width = 108, $height = 108 ); ?></a></div> |
| 31 |
<div class="thumtitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php usces_the_itemName(); ?> (<?php usces_the_itemCode(); ?>)</a></div> |
| 32 |
<?php if (usces_is_skus()) : ?> |
| 33 |
<div class="price"><?php usces_crform( usces_the_firstPrice('return'), true, false ); ?><?php usces_guid_tax(); ?></div> |
| 34 |
<?php endif; ?> |
| 35 |
</div><!-- thumbnail_box --> |
| 36 |
|
| 37 |
<?php //comments_template(); // Get wp-comments.php template ?> |
| 38 |
|
| 39 |
<?php endwhile; else: ?> |
| 40 |
<p><?php _e('The article was not found.', 'usces'); ?></p> |
| 41 |
<?php endif; ?> |
| 42 |
</div><!-- clearfix --> |
| 43 |
|
| 44 |
<div class="pagenavi"><?php posts_nav_link(' — ', __("« Previous page", 'usces'), __("next page »", 'usces')); ?></div> |
| 45 |
|
| 46 |
</div> |
| 47 |
</div><!-- end of catbox --> |
| 48 |
</div><!-- end of content --> |
| 49 |
|
| 50 |
<?php get_sidebar( 'other' ); ?> |
| 51 |
|
| 52 |
<?php get_footer(); ?> |
| 53 |
|