This repository has been archived on 2022-08-01. You can view files and clone it, but cannot push or open issues or pull requests.
Oldphaloskepsis/template-parts/content.php

30 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2017-01-12 23:10:07 +00:00
<?php
/**
* The template part for displaying content
*
* @package WordPress
* @subpackage Ben_Goldsworthy
* @since Ben Goldsworthy 1.0
*/
?>
2017-01-12 23:13:02 +00:00
<div class="col-m-6 col-4 col-w-3">
2017-01-12 23:10:07 +00:00
<a href="<?php the_permalink(); ?>">
2017-05-25 18:57:33 +00:00
<article id="post-<?php the_ID(); ?>" class="index-item" style="background-image: url('<?php the_post_thumbnail_url(); ?>'); background-position: <?php if ($position = get_post_meta(get_the_ID(), 'Header Image Position', true)) echo $position; else echo 'centre'; ?>;">
<header class="entry-header <?php if (has_tag('ohwhatohjeez')) echo 'ohwhatohjeez' ?>">
2017-04-11 07:22:35 +00:00
<div class="post-header-details">
<?php
if (strlen(get_the_title()) > 70) $small= "vsmall";
elseif (strlen(get_the_title()) > 35) $small = "small";
elseif (strlen(get_the_title()) > 12) $small = "qsmall";
?>
<h2 class="post-title <?php echo $small ?>">
<?php echo get_the_title(); ?>
<?php if ($versionNum = get_post_meta( get_the_ID(), 'Program/Version', true )) echo '<span id="version">'.$versionNum.'</span>'; ?>
</h2>
</div>
2017-01-12 23:10:07 +00:00
</header><!-- .entry-header -->
</article><!-- #post-## -->
</a>
</div>