-
Notifications
You must be signed in to change notification settings - Fork 0
/
wpneo-listing.php
41 lines (40 loc) · 1.5 KB
/
wpneo-listing.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
<?php
defined( 'ABSPATH' ) || exit;
$col_num = get_option('number_of_collumn_in_row', 3);
$number = array( "2"=>"two","3"=>"three","4"=>"four" );
?>
<div class="wpneo-wrapper">
<div class="wpneo-container">
<?php do_action('wpcf_campaign_listing_before_loop'); ?>
<div class="wpneo-wrapper-inner">
<?php if (have_posts()): ?>
<?php
$i = 1;
while (have_posts()) : the_post();
$class = '';
if( $i == $col_num ){
$class = 'last';
$i = 0;
}
if($i == 1){ $class = 'first'; }
?>
<div class="wpneo-listings <?php echo $number[$col_num]; ?> <?php echo $class; ?>">
<?php do_action('wpcf_campaign_loop_item_before_content'); ?>
<div class="wpneo-listing-content">
<?php do_action('wpcf_campaign_loop_item_content'); ?>
</div>
<?php do_action('wpcf_campaign_loop_item_after_content'); ?>
</div>
<?php $i++; endwhile; ?>
<?php
else:
wpcf_function()->template('include/loop/no-campaigns-found');
endif;
?>
</div>
<?php
do_action('wpcf_campaign_listing_after_loop');
wpcf_function()->template('include/pagination');
?>
</div>
</div>