-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsingle.php
102 lines (102 loc) · 4.57 KB
/
single.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
99
100
101
102
<?php
get_header();
$date_format = get_option( 'date_format' );
$tech_sidebar = get_post_meta( $post->ID, "Sidebar_value", $single = true );
if ( empty( $tech_sidebar ) ) {
$tech_sidebar = "unset";
}
if ( (of_get_option( 'single_sidebar', '0' ) == "1" && $tech_sidebar == "unset") || $tech_sidebar == "on" ) {
tech_show_sidebar( "l" );
}
?>
<div id="content" class="<?php echo ((of_get_option( 'single_sidebar', '0' ) == "1" && $tech_sidebar == "unset") || $tech_sidebar == "on") ? "narrow" : "wide"; ?>column">
<?php
$tech_sing_ad_code = of_get_option( 'sing_ad_code', '' );
if ( !empty( $tech_sing_ad_code ) && of_get_option( 'sing_ad_pos', 'above' ) == "above" ) {
?>
<div class="aligncenter">
<?php
$tech_sing_ad_code = stripslashes( $tech_sing_ad_code );
echo do_shortcode( $tech_sing_ad_code );
?>
</div>
<?php
}
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
?>
<?php tech_single_nav_links(); ?>
<div <?php post_class( 'clear' ); ?> id="post-<?php the_ID(); ?>">
<div class="toppost">
<a href="<?php echo home_url(); ?>" title="<?php printf( __( 'Go back to %s', 'techozoic' ), get_bloginfo( 'name' ) ); ?>" class="social homelink"></a> <?php
if ( tech_icons( 'single' ) ) {
tech_social_icons( $home = false );
}
?>
</div>
<h1 class="post_title">
<?php if ( get_the_title() != "" ) { ?>
<?php the_title(); ?>
<?php
} else {
echo get_the_date();
echo ' ';
the_time();
}
?>
</h1>
<?php do_action( 'tech_before_sing_content' ); ?>
<div class="singlepost entry">
<?php
if ( function_exists( 'the_post_thumbnail' ) ) {
the_post_thumbnail( 'single-post-thumbnail' );
}
?>
<?php the_content( '<p class="serif">' . __( 'Read the rest of this entry', 'techozoic' ) . '»</p>' ); ?>
<div class="page-links">
<?php wp_link_pages(); ?>
</div>
<div class="postmetadata alt">
<?php if ( get_the_author_meta( 'description', get_the_author_meta( 'ID' ) ) != '' ) { ?>
<div class="author-info">
<div class="alignleft"><?php echo get_avatar( get_the_author_meta( 'ID' ), 64 ); ?></div>
<h5><?php _e( 'About', 'techozoic' ); ?> <?php the_author_posts_link(); ?></h5>
<?php echo wpautop( get_the_author_meta( 'description', get_the_author_meta( 'ID' ) ) ); ?>
</div>
<?php } ?>
<div class="single-time"><?php echo get_the_time( $date_format ); ?> @ <?php echo get_the_time(); ?></div>
<div class="single-category"><?php echo get_the_category_list( ', ' ); ?></div>
<?php the_tags( '<div class="single-tags">', ', ', '</div>' ); ?>
<div class="clear"></div>
<?php edit_post_link( __( 'Edit this page.', 'techozoic' ), '<br /><p>', '</p>' ); ?>
</div>
</div>
<?php do_action( 'tech_after_sing_content' ); ?>
</div>
<?php
$tech_sing_ad_code = of_get_option( 'sing_ad_code', '' );
if ( !empty( $tech_sing_ad_code ) && of_get_option( 'sing_ad_pos', 'above' ) == "below" ) {
?>
<div class="aligncenter">
<?php
$tech_sing_ad_code = stripslashes( $tech_sing_ad_code );
echo do_shortcode( $tech_sing_ad_code );
?>
</div>
<?php
}
comments_template();
} //End While Loop
} else {
?>
<p><?php _e( 'Sorry, no posts matched your criteria.', 'techozoic' ) ?></p>
<?php
} //End If loop
?> </div>
<?php
if ( (of_get_option( 'single_sidebar', '0' ) == "1" && $tech_sidebar == "unset") || $tech_sidebar == "on" ) {
tech_show_sidebar( "r" );
}
get_footer();
?>