forked from wpcampus/wpcampus-wp-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate-contributors.php
More file actions
53 lines (37 loc) · 892 Bytes
/
template-contributors.php
File metadata and controls
53 lines (37 loc) · 892 Bytes
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
<?php
/**
* Template Name: WPCampus Contributors
*/
$users = new WP_User_Query( array(
'number' => -1,
'orderby' => 'name',
'order' => 'ASC',
'has_published_posts' => array( 'post', 'podcast', 'video' ),
));
get_header();
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
wpcampus_print_article();
endwhile;
endif;
// Print user registration promo.
wpcampus_print_user_reg_promo();
if ( empty( $users->results ) ) :
?>
<p><?php _e( 'There are no contributors.', 'wpcampus' ); ?></p>
<?php
else :
do_action( 'wpcampus_before_contributors' );
?>
<div class="wpcampus-contributors">
<?php
foreach ( $users->results as $user ) :
wpcampus_print_contributor( $user->ID );
endforeach;
?>
</div><!--.wpcampus-contributors-->
<?php
do_action( 'wpcampus_after_contributors' );
endif;
get_footer();