-
Notifications
You must be signed in to change notification settings - Fork 0
/
tag.php
85 lines (76 loc) · 2.78 KB
/
tag.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
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
<?php // (C) Copyright Bobbing Wide 2017
/**
* Implement a tighter loop for tag archives
*
* Basically we don't want any content except the featured image
*
* BUT
* one day we might look at {@link https://github.com/desandro/masonry}
*
*/
function genesis_a2z_do_loop() {
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
//do_action( 'genesis_before_entry' );
printf( '<article %s>', genesis_attr( 'entry' ) );
//do_action( 'genesis_before_entry_content' );
//printf( '<div %s>', genesis_attr( 'entry-content' ) );
do_action( 'genesis_entry_header' );
do_action( 'genesis_entry_content' );
//echo '</div>';
//do_action( 'genesis_after_entry_content' );
//do_action( 'genesis_entry_footer' );
echo '</article>';
//do_action( 'genesis_after_entry' );
}
do_action( 'genesis_after_endwhile' );
} else {
do_action( 'genesis_loop_else' );
}
}
/**
* Enqueue special styles for archives
*/
function genesis_a2z_after_footer() {
//bw_trace2();
//bw_backtrace();
$timestamp = null;
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
$timestamp = filemtime( get_stylesheet_directory() . "/tag.css" );
}
wp_enqueue_style( "tag-css", get_stylesheet_directory_uri() . '/tag.css', array() );
}
/*
* Output from genesistant
*
* We don't want either post_content nor post_content_nav
* but we do want the image and may need the post permalink
* but this should be before the image
*
* `
* <!--
* action genesis_entry_content genesis_loop,genesis_entry_content
*
* : 8 genesis_do_post_image;1
* : 10 genesis_do_post_content;1
* : 12 genesis_do_post_content_nav;1
* : 14 genesis_do_post_permalink;1-->
*/
remove_action( "genesis_entry_content", "genesis_do_post_image", 8 );
remove_action( "genesis_entry_content", "genesis_do_post_content", 10 );
remove_action( "genesis_entry_content", "genesis_do_post_content_nav", 12 );
remove_action( "genesis_entry_content", "genesis_do_post_permalink", 14 );
add_action( "genesis_entry_content", "genesis_do_post_permalink", 6 );
// Not necessary to remove these hooks if we don't invoke the action
//remove_action( "genesis_entry_footer", 'genesis_a2z_post_info' );
//remove_action( "genesis_entry_footer", "genesis_entry_footer_markup_open", 5);
//remove_action( "genesis_entry_footer", "genesis_entry_footer_markup_close", 15 );
//remove_action( "genesis_entry_header", "genesis_do_post_format_image", 4 );
remove_action( "genesis_loop", "genesis_do_loop" );
add_action( "genesis_loop", "genesis_a2z_do_loop" );
//add_action( "genesis_after_footer", "genesis_a2z_after_footer" );
add_action( "wp_enqueue_scripts", "genesis_a2z_after_footer" );
add_action( "genesis_before_loop", "genesis_a2z_a2z", 9 );
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
genesis();