27 lines
932 B
PHP
27 lines
932 B
PHP
<?php
|
|
/**
|
|
* The template part for displaying content
|
|
*
|
|
* @package WordPress
|
|
* @subpackage Ben_Goldsworthy
|
|
* @since Ben Goldsworthy 1.0
|
|
*/
|
|
?>
|
|
|
|
<div class="col-m-4 col-3 col-w-5">
|
|
<a href="<?php the_permalink(); ?>">
|
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
|
|
<header class="entry-header">
|
|
<?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
|
|
<span class="sticky-post"><?php _e( 'Featured', 'bengoldsworthy' ); ?></span>
|
|
<?php endif; ?>
|
|
|
|
<?php
|
|
if (strlen(get_the_title()) > 70) $small= "class=\"vsmall\"";
|
|
elseif (strlen(get_the_title()) > 35) $small = "class=\"small\"";
|
|
the_title( '<h3 '.$small.'>', '</h3>' );
|
|
?>
|
|
</header><!-- .entry-header -->
|
|
</article><!-- #post-## -->
|
|
</a>
|
|
</div>
|