PHP Classes

File: single-playlist.php

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

Contents

Class file image Download
<?php get_header(); ?>

<main id="single">
    <div class="container">
        <?php get_template_part('parts/header_info'); ?>
<div class="row post-title">
            <div class="column">
                <section class="banner-container">
                    <div class="cover" style="background-image: url(<?= get_the_post_thumbnail_url() ?>);"></div>
                </section>
            </div>
            <div class="column">
                <?php get_template_part('elements/links'); ?>
<h1><?= get_the_title() ?></h1>
                <?php get_template_part('elements/post_details', null, [
                   
'show_author' => true
               
]); ?>
<p><?= get_the_excerpt() ?></p>
            </div>
        </div>
        <?php get_template_part('elements/nav'); ?>
<div class="content post-content last-posts">
            <?php
               
if (!empty(get_post_meta(get_the_ID(), 'tag', true))) {
                   
$tag = get_post_meta(get_the_ID(), 'tag', true);

                   
$queryArgs = [
                       
'post_type' => 'post',
                       
'posts_per_page' => -1,
                       
'tag' => $tag,
                       
'order' => 'ASC'
                   
];
           
                   
$query = new WP_Query( $queryArgs );
           
                    if (
$query->have_posts()) {
                        while (
$query->have_posts()) {
                           
$query->the_post();
                           
get_template_part('elements/post_item', null, [
                               
'is_first' => false,
                               
'show_player' => true
                           
]);
                        }
                    }
                }
           
?>
</div>
    </div>
</main>

<?php get_footer(); ?>