Created
March 9, 2015 07:49
-
-
Save wiesmann/b45833676d2da4a225f9 to your computer and use it in GitHub Desktop.
sixteen-content-default.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Sixteen | |
*/ | |
?> | |
<div class="article-wrapper"> | |
<article id="post-<?php the_ID(); ?>" <?php post_class('homepage-article'); ?>> | |
<div class="featured-image"> | |
<a href="<?php the_permalink(); ?>"><img src="<?php echo get_template_directory_uri()."/defaults/images/dimg".mt_rand(1,7).".jpg"; ?>"></a> | |
</div> | |
<header class="entry-header"> | |
<?php | |
if (mb_strwidth(get_the_title()) >= 85) { ?> | |
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" data-title="<?php the_title(); ?>" rel="bookmark"> | |
<?php echo mb_strimwidth(get_the_title(), 0, 84)."…"; | |
} | |
else { ?> | |
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"> | |
<?php the_title(); | |
} | |
?> | |
</a></h1> | |
</header><!-- .entry-header --> | |
</article><!-- #post-## --> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment