forked from wpcampus/wpcampus-wp-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
37 lines (27 loc) · 766 Bytes
/
archive.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
<?php
// Add article meta after header.
add_action( 'wpcampus_after_article_header', 'wpcampus_print_article_meta', 5 );
/**
* Add contributor info before articles.
*/
function wpcampus_author_archive_add_contributor() {
if ( is_author() ) {
wpcampus_print_contributor();
}
}
add_action( 'wpcampus_before_articles', 'wpcampus_author_archive_add_contributor' );
get_header();
if ( ! have_posts() ) :
wpcampus_print_404();
else :
// Setup article arguments.
$args = array(
'header' => 'h2',
'print_content' => false,
);
add_filter( 'the_title', 'wpcampus_prepend_post_title', 100, 2 );
// Print the articles.
wpcampus_print_articles( $args );
remove_filter( 'the_title', 'wpcampus_prepend_post_title', 100, 2 );
endif;
get_footer();