-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive-download.php
More file actions
142 lines (95 loc) · 4.34 KB
/
archive-download.php
File metadata and controls
142 lines (95 loc) · 4.34 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
/**
* Download archive page (for EDD).
*
* @since 0.1.0
* @package RealBigPlugins
*/
// Don't load directly
if ( ! defined( 'ABSPATH' ) ) {
die;
}
get_header();
global $wp_query;
?>
<section class="downloads-header">
<?php if ( is_tax() ) : ?>
<h3>
All <?php echo get_queried_object()->name; ?> Plugins
</h3>
<?php else : ?>
<h3>Our Plugins</h3>
Made with <span class="cursive">love</span>
<?php endif; ?>
</section>
<div class="page-content row">
<section class="store-template">
<?php if ( function_exists( 'facetwp_display' ) ) : ?>
<div class="facets">
<div class="grid-container">
<div class="grid-x">
<div class="small-12 cell">
<?php echo facetwp_display( 'facet', 'download_categories' ); ?>
</div>
</div>
</div>
</div>
<?php elseif ( current_user_can( 'manage_options' ) ) : ?>
<p>
Please activate FacetWP and then add the following under Settings -> FacetWP -> Settings -> Import/Export in the Import Field:
</p>
<code>
{"facets":[{"name":"download_categories","label":"Download Categories","type":"checkboxes","source":"tax/download_category","parent_term":"","modifier_type":"off","modifier_values":"","hierarchical":"yes","show_expanded":"no","ghosts":"no","preserve_ghosts":"no","operator":"or","orderby":"count","count":"9999","soft_limit":"10"}]}
</code>
<?php endif; ?>
<div class="animate-on-scroll scale-in-up">
<?php if ( have_posts() ) : ?>
<?php
// Get column classes
global $posts;
switch ( count( $posts ) ) {
case 1:
$column_classes = 'small-up-1';
break;
case 2:
$column_classes = 'small-up-1 medium-up-2';
break;
default:
$column_classes = 'small-up-1 medium-up-2 large-up-3';
break;
}
?>
<div class="grid-x <?php echo $column_classes; ?>" data-equalizer data-equalize-by-row="true">
<?php while ( have_posts() ) : the_post(); ?>
<div <?php post_class( array( 'product', 'cell' ) ); ?>>
<div class="product-container">
<div class="product-container-top" data-equalizer-watch>
<div class="product-image">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail( 'product-image' ); ?>
</a>
</div>
<a href="<?php the_permalink(); ?>">
<h4 class="title"><strong><?php the_title(); ?></strong></h4>
</a>
<?php the_excerpt(); ?>
</div>
<hr />
<div class="product-container-bottom">
<a href="<?php the_permalink(); ?>" class="button secondary">View Details</a>
</div>
</div>
</div><!--end .product-->
<?php endwhile; ?>
</div>
<?php else : ?>
<div class="entry">
<h2 class="title">Not Found</h2>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>
</div><!--end .entry-->
<?php endif; ?>
</section>
</div>
<?php
get_footer();