-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathcontent-image.php
45 lines (45 loc) · 1.35 KB
/
content-image.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
<div class="enpty-home">
<?php
$img = get_the_post_thumbnail( $post->ID, 'thumbnail' );
if ( empty( $img ) ){
$imgResult = get_post_thumb();
if ( !empty( $imgResult ) ) {
?>
<div class="pic">
<a href="<?php the_permalink(); ?>">
<?php
echo $imgResult;
$format = get_post_format();
if( false === $format ) { $format = 'standard'; }
?>
<span class="<?php echo $format; ?>"></span>
</a>
</div>
<?php
}
?>
<?php
} else {
?>
<div class="pic">
<a href="<?php the_permalink(); ?>">
<?php
echo $img;
$format = get_post_format();
if( false === $format ) { $format = 'standard'; }
?>
<span class="<?php echo $format; ?>"></span>
</a>
</div>
<?php
}
?>
<div class="info">
<?php if(function_exists('the_views')) { ?>
<div class="itm hot"><a href="<?php the_permalink(); ?>"><?php _e('Hot','PhotoBroad'); ?> (<?php echo the_views('Views', true);?>)</a></div>
<?php } ?>
<div class="itm mess"><?php comments_popup_link( __( 'Comment', 'PhotoBroad' ).'( 0 )', __( 'Comment', 'PhotoBroad' ).'( 1 )', __( 'Comment', 'PhotoBroad' ).'( % )'); ?></div>
<div class="itm date"><a href="<?php the_permalink(); ?>"><?php echo get_the_date(); ?></a></div>
<a href="<?php the_permalink(); ?>" class="image icon"><?php _e( 'Read More', 'PhotoBroad' ); ?></a>
</div>
</div>