-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcontent.php
61 lines (50 loc) · 2.06 KB
/
content.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
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
/**
* The default template for displaying content
*/
global $woo_options;
/**
* The Variables
*
* Setup default variables, overriding them if the "Theme Options" have been saved.
*/
$settings = array(
'thumb_w' => 100,
'thumb_h' => 100,
'thumb_align' => 'alignleft',
'post_content' => 'excerpt',
'comments' => 'both'
);
$settings = woo_get_dynamic_values( $settings );
?>
<article <?php post_class(); ?>>
<header>
<h1><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<span class="post-date-author"><strong class="post-date"><?php the_time( get_option( 'date_format' ) ); ?></strong> <?php _e( 'by','woothemes'); ?> <strong class="post-author"><?php the_author_posts_link(); ?></strong></span>
<span class="post-category"><?php the_category( ' ' ); ?></span>
</header>
<?php
if ( 'content' != $settings['post_content'] ) {
woo_image( 'width=' . $settings['thumb_w'] . '&height=' . $settings['thumb_h'] . '&class=thumbnail ' . $settings['thumb_align'] );
}
?>
<section class="entry">
<?php if ( 'content' == $settings['post_content'] ) { the_content( __( 'Continue Reading →', 'woothemes' ) ); } else { the_excerpt(); } ?>
</section>
<?php if ( 'excerpt' == $settings['post_content'] ) { ?>
<footer class="post-more">
<?php
if ( in_array( $settings['comments'], array( get_post_type(), 'both' ) ) && comments_open() ) {
?>
<span class="comments">
<?php
comments_popup_link( __( 'Leave a comment', 'woothemes' ), __( '1 Comment', 'woothemes' ), __( '% Comments', 'woothemes' ) );
?>
</span>
<span class="post-more-sep">•</span>
<?php } ?>
<span class="read-more"><a href="<?php the_permalink(); ?>" title="<?php esc_attr_e( 'Continue Reading →', 'woothemes' ); ?>"><?php _e( 'Continue Reading →', 'woothemes' ); ?></a></span>
</footer>
<?php } ?>
</article><!-- /.post -->