PHP Classes

File: elements/post_item.php

Recommend this page to a friend!
  Classes of Victor Andeloci   Project P Wordpress Podcast Theme   elements/post_item.php   Download  
File: elements/post_item.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Project P Wordpress Podcast Theme
Publish pages for a podcast in a WordPress site
Author: By
Last change: playlist page
Date: 8 months ago
Size: 1,720 bytes
 

Contents

Class file image Download
<div class="post-item">
    <div class="row">
        <div class="column">
            <a href="<?= get_permalink() ?>">
                <?php if (!empty($args['is_first']) && $args['is_first'] == true) : ?>
<img src="<?= get_the_post_thumbnail_url(get_the_ID(), 'medium'); ?>" class="thumb" alt="<?= get_the_title() ?>">
                <?php else : ?>
<img
                        class="thumb"
                        alt="<?= get_the_title() ?>"
                        src="<?= get_template_directory_uri() . '/assets/img/default-image.jpg' ?>"
                        lazy-load-img="<?= get_the_post_thumbnail_url(get_the_ID(), 'medium'); ?>"
                    >
                <?php endif; ?>
            </a>
        </div>
        <div class="column">
            <a href="<?= get_permalink() ?>"><h3><?= get_the_title() ?></h3></a>
            <?php get_template_part('elements/post_details'); ?>
<div class="post-content">
                <?php if (!empty($args['is_first']) && $args['is_first'] == true) : ?>
<?php get_template_part('elements/podcast_player'); ?>
<?= get_the_content() ?>
<?php elseif (!empty($args['show_player']) && $args['show_player'] == true) : ?>
<?php get_template_part('elements/podcast_player'); ?>
<?= get_the_excerpt() ?>
<?php else : ?>
<?= get_the_excerpt() ?>
<?php endif; ?>
            </div>
            <?php get_template_part('elements/tags_container', null, [
               
'show_least' => true
           
]); ?>
</div>
    </div>
</div>