-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-home.php
executable file
·38 lines (30 loc) · 1.01 KB
/
content-home.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
<?php
/**
* @package Spun
*/
/*
* Get the post thumbnail; if one does not exist, try to get the first attached image.
* If no images exist, let's print the post title instead.
*/
$restore_widont = remove_filter( 'the_title', 'widont' );
$postclass = '';
$spun_image = spun_get_image( get_the_ID() );
if ( '' != $spun_image ) :
$thumb = $spun_image;
else :
$thumb = '<span class="thumbnail-title no-thumbnail">' . get_the_title() . '</span>';
$postclass = 'no-thumbnail';
endif;
if ( 'no-thumbnail' != $postclass ) :
$thumb .= '<span class="thumbnail-title">' . get_the_title() . '</span>';
endif;
$title = esc_attr( the_title_attribute( 'echo=0' ) );
?>
<article style="padding-top:40px" align="center" id="post-<?php the_ID(); ?>" <?php post_class( $postclass ); ?>>
<a href="<?php the_permalink(); ?>" title="<?php echo $title; ?>" rel="bookmark">
<?php echo $thumb; ?>
<?php echo $title; ?>
</a>
</article><!-- #post-<?php the_ID(); ?> -->
<?php if ( $restore_widont )
add_filter( 'the_title', 'widont' ); ?>