-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmp_tag.php
103 lines (70 loc) · 3 KB
/
mp_tag.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php get_header(); ?>
<!-- Page -->
<div id="page-wrapper">
<div class="header-section">
<div class="outercontainer">
<div class="container">
<div class="clear padding30"></div>
<?php
global $wp_query;
$termname = $wp_query->queried_object->name;
$termslug = $wp_query->queried_object->slug;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$showmpdg = get_option('mpt_mpdg_enable_dg');
$entries = ( !empty($showmpdg) ? ( $showmpdg == 'true' ? get_option('mpt_mpdg_listing_entries') : get_option('mpt_mp_listing_entries')) : get_option('mpt_mp_listing_entries'));
$moreargs = array(
'showposts' => $entries,
'orderby' => 'date',
'order' => 'DESC',
'paged' => $paged
);
$args = array_merge( $wp_query->query_vars, $moreargs );
query_posts($args);
?>
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; ?>
<h1 class="page-header"><span><?php _e('Items tagged with '); ?>‘<?php echo $termname; ?>’</span></h1>
<div class="clear padding15"></div>
</div><!-- / container -->
</div><!-- / outercontainer -->
</div><!-- / header-section -->
<div class="content-section">
<div class="outercontainer">
<div class="clear padding30"></div>
<div class="container" style="min-height: 450px;">
<?php if ( class_exists( 'MarketPress' ) ) { ?>
<div id="mpt-product-grid">
<?php do_action('flexmarket_tag_page' , $termslug , 'tag'); ?>
</div>
<?php } ?>
<?php else : ?>
<!-- nothing found -->
<?php $post = $posts[0]; ?>
<h1 class="page-header"><span><?php _e('Items tagged with '); ?>‘<?php echo $termname; ?>’</span></h1>
<div class="clear padding15"></div>
</div><!-- / container -->
</div><!-- / outercontainer -->
</div><!-- / header-section -->
<div class="content-section">
<div class="outercontainer">
<div class="clear padding30"></div>
<div class="container" style="min-height: 450px;">
<h2><?php _e('Nothing Found.'); ?></h2>
<p><?php _e('Perhaps try one of the links below:'); ?></p>
<div class="padding10"></div>
<h4><?php _e('Most Used Categories'); ?></h4>
<ul>
<?php wp_list_categories( array( 'taxonomy' => 'product_category' , 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?>
</ul>
<div class="padding20"></div>
<p><?php _e('Or, use the search box below:'); ?></p>
<?php get_search_form(); ?>
<div class="padding20"></div>
<!-- / nothing found -->
<?php endif; ?>
</div><!-- / container -->
</div><!-- / outercontainer -->
</div><!-- / content-section -->
</div><!-- / page-wrapper -->
<?php get_template_part('footer', 'widget'); ?>
<?php get_footer(); ?>