PHP Classes

File: templates/playlists.php

Recommend this page to a friend!
  Classes of Victor Andeloci   Project P Wordpress Podcast Theme   templates/playlists.php   Download  
File: templates/playlists.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: 11 months ago
Size: 1,081 bytes
 

Contents

Class file image Download
<?php
   
/* Template Name: Playlists */
   
get_header();
?>

<main id="page" class="playlists">
    <div class="container">
        <?php get_template_part('parts/header_info'); ?>
<?php get_template_part('parts/banner_min', null, [
           
'page_title' => get_the_title()
        ]);
?>
<?php get_template_part('elements/nav'); ?>
<div class="content post-content">
            <?= get_the_content() ?>
</div>
        <div class="lists">
            <?php
                $args
= [
                   
'post_type' => 'playlist',
                   
'order' => 'DESC',
                   
'posts_per_page' => -1
               
];
           
               
$query = new WP_Query($args);
           
                if (
$query->have_posts()) :
                    while (
$query->have_posts()) :
                       
$query->the_post();
                       
get_template_part('elements/playlist_item');
                    endwhile;
                endif;
           
?>
</div>
    </div>
</main>

<?php get_footer(); ?>