Repository navigation
Expand file tree
/
Copy pathcontent.php
More file actions
52 lines (44 loc) · 1.48 KB
/
Copy pathcontent.php
File metadata and controls
52 lines (44 loc) · 1.48 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
<?php
/**
* This template is used to display content of page.
*
* @package ThemeGrill
* @subpackage Ample
* @since Ample 0.1
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php do_action( 'ample_before_post_content' ); ?>
<?php
if( is_single() ) { ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php }
else{ ?>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute();?>"><?php the_title(); ?></a></h2>
<?php } ?>
<?php ample_meta_select(); ?>
<?php
if ( has_post_thumbnail() ) {
$image = '';
$title_attribute = the_title_attribute( 'echo=0' );
$thumb_id = get_post_thumbnail_id( get_the_ID() );
$img_altr = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true );
$img_alt = ! empty( $img_altr ) ? $img_altr : $title_attribute;
$image .= '<figure class="post-featured-image">';
$image .= '<a href="' . get_permalink() . '" title="' . $title_attribute . '">';
$image .= get_the_post_thumbnail( $post->ID, 'ample-featured-blog-large', array(
'title' => $title_attribute,
'alt' => $img_alt,
) ) . '</a>';
$image .= '</figure>';
echo $image;
}
?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div>
<div class="read-btn">
<a class="btn-default-th" href="<?php the_permalink(); ?>" title="<?php the_title_attribute();?>"><?php _e('Read more', 'ample') ?></a>
</div>
<?php do_action( 'ample_after_post_content' ); ?>
</article>