-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcontent-body.php
More file actions
64 lines (41 loc) · 1.27 KB
/
content-body.php
File metadata and controls
64 lines (41 loc) · 1.27 KB
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
<?php
/**
* The template for displaying the main content or excerpt
*
* @package Intro
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 1.0
*/
?>
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<?php do_action('intro_before_content'); ?>
<div class="entry-content" itemprop="articleBody">
<?php do_action('intro_top_content'); ?>
<?php if (is_single()):
// Display an excerpt on comments page
if(get_query_var( 'cpage' ) > 0):
echo intro_excerpt(50);
else:
the_content();
endif;
elseif(is_category() || is_tax() || is_search()):
echo intro_excerpt(25);
?>
<p class="readmore">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark" itemprop="url"><?php _e('Read more','intro'); ?></a>
</p>
<?php
elseif(is_tag()):
// No excerpt for tags archives
echo intro_excerpt(0);
else:
echo intro_excerpt(40);
?>
<p class="readmore">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark" itemprop="url"><?php _e('Read more','intro'); ?></a>
</p>
<?php
endif; ?>
<?php do_action('intro_bottom_content'); ?>
</div><!--END .entry-content -->
<?php do_action('intro_after_content'); ?>