-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-attachment.php
71 lines (55 loc) · 1.96 KB
/
single-attachment.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
<?php // (C) Copyright Bobbing Wide 2015
_e_c( __FILE__ );
/**
* Template file for the attachment post type
*
* We do want:
* - Title
* - the content
* - the create date and modification date with Edit link
* - Sidebar
* Sidebar widgets expected to be
* - Information
* - Download links
* - Search
*
*
* We don't want:
* - Post info from meta data
* - Published by
* - Breadcrumbs
* - Filed Under:
* - A link to a premium plugin or theme version - not even one that doesn't work
*
* Found out how to do this by using {@link genesis.wp-a2z.org}
* and oik-bwtrace and good old grep.
*/
//add_theme_support( 'html5' );
// Remove post info
//remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
// Remove breadcrumbs
//remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
// Remove the entry meta in the entry footer. i.e. Remove the Filed Under:
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
//bw_disable_filter( 'genesis_edit_post_link',
//remove_action( 'genesis_edit_post_link',
//remove_action( 'genesis_before_post_content', 'genesis_post_info' );
// Remove post info
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
//add_action( 'genesis_entry_footer', 'genesis_post_info' );
add_action( 'genesis_entry_footer', 'genesis_oik_post_info' );
// Put the image before the rest of the content.
//add_action( 'genesis_entry_content', 'genesis_image_do_entry_content', 9 );
remove_action( 'genesis_after_content', 'genesis_get_sidebar' );
add_action( 'genesis_after_content', 'genesis_oik_get_sidebar' );
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );
$parent_id = wp_get_post_parent_id( null );
if ( $parent_id ) {
bw_trace2( $parent_id );
$post_type = get_post_type( $parent_id );
if ( $post_type === "oik_premiumversion" || $post_type === "oik_themiumversion" ) {
remove_action( "the_content", "prepend_attachment" );
}
}
//e( $post_type );
genesis();