PHP Classes

File: elements/highlight_item.php

Recommend this page to a friend!
  Classes of Victor Andeloci   One WordPress Game Theme   elements/highlight_item.php   Download  
File: elements/highlight_item.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: One WordPress Game Theme
WordPress theme for a gaming blog and podcast
Author: By
Last change:
Date: 1 year ago
Size: 666 bytes
 

Contents

Class file image Download
<?php
    $thumbnail
= trim(get_post_meta(get_the_ID(), 'one_highlight_thumb_url', true));
    if (empty(
$thumbnail))
       
$thumbnail = get_the_post_thumbnail_url(get_the_ID(), 'large');
?>
<a
    href="<?= get_permalink() ?>"
    class="highlight-item"
    draggable="false"
    style="background-image: url(<?= !empty($thumbnail)
                                        ?
$thumbnail
                                       
: (get_template_directory_uri() . '/assets/img/default-image.png') ?>);">
    <div class="overlay"></div>
    <div class="content">
        <h3><?= get_the_title() ?></h3>
        <hr>
        <p><?= excerpt(15) ?></p>
    </div>
</a>