-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathcontent-video.php
69 lines (68 loc) · 2.3 KB
/
content-video.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
<div class="enpty-home">
<?php
$img = get_the_post_thumbnail( $post->ID, 'thumbnail' );
if ( empty( $img ) ){
$video_img = get_post_meta( $post->ID, "PhotoBroad_video_upimg", true );
if ( empty( $video_img ) ){
$imgResult = get_post_thumb();
if ( !empty( $imgResult ) ) {
$strlen = get_text_length( 'image' );
?>
<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
} else {
$strlen = get_text_length( 'text' );
?>
<h2 class="enpty-home-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php
}
} else {
$strlen = get_text_length( 'image' );
?>
<div class="pic">
<a href="<?php the_permalink(); ?>">
<?php
echo '<img src="'.get_bloginfo("template_url").'/timthumb.php?src='.$video_img.'&q=100&w=210" alt="" />';
$format = get_post_format();
if( false === $format ) { $format = 'standard'; }
?>
<span class="<?php echo $format; ?>"></span>
</a>
</div>
<?php
}
} else {
$strlen = get_text_length( 'image' );
?>
<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="text"><p><?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, $strlen," [...]");?></p></div>
<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="video icon"><?php _e( 'Read More', 'PhotoBroad' ); ?></a>
</div>
</div>