-
Notifications
You must be signed in to change notification settings - Fork 0
/
content-post.php
72 lines (65 loc) · 2.17 KB
/
content-post.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
<?php
/**
* Post Content Template
*
* This template is the default page content template. It is used to display the content of the
* `single.php` template file, contextually, as well as in archive lists or search results.
*
* @package WooFramework
* @subpackage Template
*/
/**
* Settings for this template file.
*
* This is where the specify the HTML tags for the title.
* These options can be filtered via a child theme.
*
* @link http://codex.wordpress.org/Plugin_API#Filters
*/
$settings = array(
'thumb_w' => 100,
'thumb_h' => 100,
'thumb_align' => 'alignleft',
'post_content' => 'excerpt',
'comments' => 'both'
);
$settings = woo_get_dynamic_values( $settings );
$title_before = '<h1 class="title entry-title">';
$title_after = '</h1>';
if ( ! is_single() ) {
$title_before = '<h2 class="title entry-title">';
$title_after = '</h2>';
$title_before = $title_before . '<a href="' . esc_url( get_permalink( get_the_ID() ) ) . '" rel="bookmark" title="' . the_title_attribute( array( 'echo' => 0 ) ) . '">';
$title_after = '</a>' . $title_after;
}
$page_link_args = apply_filters( 'woothemes_pagelinks_args', array( 'before' => '<div class="page-link">' . __( 'Pages:', 'woothemes' ), 'after' => '</div>' ) );
woo_post_before();
?>
<article <?php post_class(); ?>>
<?php
woo_post_inside_before();
if ( 'content' != $settings['post_content'] && ! is_singular() )
woo_image( 'width=' . esc_attr( $settings['thumb_w'] ) . '&height=' . esc_attr( $settings['thumb_h'] ) . '&class=thumbnail ' . esc_attr( $settings['thumb_align'] ) );
?>
<header>
<?php the_title( $title_before, $title_after ); ?>
</header>
<?php
woo_post_meta();
?>
<section class="entry">
<?php
if ( 'content' == $settings['post_content'] || is_single() ) { the_content( __( 'Continue Reading →', 'woothemes' ) ); } else { the_excerpt(); }
if ( 'content' == $settings['post_content'] || is_singular() ) wp_link_pages( $page_link_args );
?>
</section><!-- /.entry -->
<div class="fix"></div>
<?php
woo_post_inside_after();
?>
</article><!-- /.post -->
<?php
woo_post_after();
$comm = $settings['comments'];
if ( ( 'post' == $comm || 'both' == $comm ) && is_single() ) { comments_template(); }
?>