-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathattachment_.php
98 lines (88 loc) · 2.52 KB
/
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
/**
* The Template for displaying all single posts
*/
global $wdwt_front,
$post;
get_header();
$sauron_meta = get_post_meta($post->ID, WDWT_META,TRUE);
$show_featured_image = $wdwt_front->get_param('show_featured_image', $sauron_meta, true);
?>
<div class="right_container">
<div class="container">
<?php if ( is_active_sidebar( 'sidebar-1' ) ) { ?>
<aside id="sidebar1" >
<div class="sidebar-container">
<?php dynamic_sidebar( 'sidebar-1' ); ?>
<div class="clear"></div>
</div>
</aside>
<?php } ?>
<div id="content">
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<div class="single-post">
<h2 class="page-header"><?php the_title(); ?></h2>
<?php $tumb_id = get_post_thumbnail_id( $post->ID );
$thumb_url=wp_get_attachment_image_src($tumb_id,'full');
if( $thumb_url ) {
$thumb_url = $thumb_url[0];
}
else {
$thumb_url = sauron_frontend_functions::catch_that_image();
$thumb_url = $thumb_url['src'];
}
$background_image = $thumb_url;
list($image_thumb_width, $image_thumb_height) = getimagesize($background_image);
$has_thumb = true;
if (strpos($background_image,'default.png') !== false) {
$has_thumb = false;
}
?>
<?php if(has_post_thumbnail() && $show_featured_image){ ?>
<div class="post-thumbnail-div">
<div class="img_container fixed searched size250x180">
<?php echo sauron_frontend_functions::fixed_thumbnail(250, 180, false); ?>
</div>
</div>
<?php } ?>
<div class="entry">
<?php the_content(); ?>
</div>
<?php
if($wdwt_front->get_param('date_enable', $sauron_meta, false)){ ?>
<div class="entry-meta">
<?php sauron_frontend_functions::posted_on_single();
sauron_frontend_functions::entry_meta();
?>
</div>
<?php }?>
<?php
wp_link_pages();
sauron_frontend_functions::post_nav(); ?>
<div class="clear"></div>
<?php
wp_reset_query();
if(comments_open() || get_comments_number() )
{ ?>
<div class="comments-template">
<?php comments_template(); ?>
</div>
<?php
}
?>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<?php if ( is_active_sidebar( 'sidebar-2' ) ) { ?>
<aside id="sidebar2">
<div class="sidebar-container">
<?php dynamic_sidebar( 'sidebar-2' ); ?>
<div class="clear"></div>
</div>
</aside>
<?php } ?>
<div class="clear"></div>
</div>
</div>
<?php get_footer(); ?>