forked from initLab/initlanesis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive.php
More file actions
49 lines (30 loc) · 1.03 KB
/
archive.php
File metadata and controls
49 lines (30 loc) · 1.03 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
<?php
/*
* Archive Page
*
*/
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'zp_custom_archive_page' );
function zp_custom_archive_page(){
global $post, $paged;
$include = genesis_get_option( 'blog_cat' );
$exclude = genesis_get_option( 'blog_cat_exclude' ) ? explode( ',', str_replace( ' ', '', genesis_get_option( 'blog_cat_exclude' ) ) ) : '';
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
if ( have_posts() ) : while ( have_posts() ) : the_post();
do_action( 'genesis_before_entry' );
printf( '<article %s>', genesis_attr( 'entry' ) );
// check post format and call template
$format = get_post_format();
get_template_part( 'content', $format );
do_action( 'genesis_after_entry_content' );
//do_action( 'genesis_entry_footer' );
echo '</article>';
do_action( 'genesis_after_entry' );
endwhile;
endif;
//* Genesis navigation
genesis_posts_nav();
//* Restore original query
wp_reset_query();
}
genesis();