-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent-video.php
More file actions
64 lines (38 loc) · 1.52 KB
/
content-video.php
File metadata and controls
64 lines (38 loc) · 1.52 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
<div class="post-container">
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ($pos=strpos($post->post_content, '<!--more-->')): ?>
<div class="featured-media">
<?php
// Fetch post content
$content = get_post_field( 'post_content', get_the_ID() );
// Get content parts
$content_parts = get_extended( $content );
// oEmbed part before <!--more--> tag
$embed_code = wp_oembed_get($content_parts['main']);
echo $embed_code;
?>
</div> <!-- /featured-media -->
<?php endif; ?>
<?php if ( is_sticky() ) : ?>
<div class="is-sticky">
<div class="genericon genericon-pinned"></div>
</div>
<?php endif; ?>
<div class="post-inner">
<?php $title_var = get_the_title(); ?>
<?php if ( !empty( $title_var ) ) : ?>
<div class="post-header">
<h2 class="post-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
</div> <!-- /post-header -->
<?php endif; ?>
<?php
if ($pos=strpos($post->post_content, '<!--more-->')) {
echo '<p class="post-excerpt">' . mb_strimwidth($content_parts['extended'], 0, 200, '...') . '</p>';
} else {
the_excerpt('100');
}
?>
<?php garfunkel_meta(); ?>
</div> <!-- /post-inner -->
</div>
</div>