81 lines
2.3 KiB
PHP
81 lines
2.3 KiB
PHP
<?php
|
|
get_header();
|
|
global $photocore;
|
|
$term_id = get_queried_object()->term_id;
|
|
$current_term = get_term($term_id);
|
|
?>
|
|
|
|
<div id="primary" class="content-area">
|
|
<main id="main" class="site-main">
|
|
|
|
<?php
|
|
$featured_image_id = $photocore->get_folder_thumbnail( $term_id );
|
|
if($featured_image_id) {
|
|
$featured_image = wp_get_attachment_image_src($featured_image_id, 'kantan-hero-image')[0];
|
|
require get_template_directory() . '/components/opaque-featured-image.php';
|
|
}
|
|
?>
|
|
|
|
<div class="single-folder large-container top-and-bottom-margin">
|
|
<?php
|
|
if(!class_exists("Photography_Core")) {
|
|
_e("Sorry, but it seems you haven't installed the Photography Core plugin ? Please install it to use photography related features on this theme.", "yuzu");
|
|
}
|
|
else {
|
|
?>
|
|
<div class="page-header medium-container">
|
|
<h1 class="page-title"><?= get_queried_object()->name; ?></h1>
|
|
</div>
|
|
|
|
<?php
|
|
$collections = $photocore->get_collections($term_id);
|
|
if( count( $collections ) != 0 ) {
|
|
?>
|
|
<div class="large-container">
|
|
<div class="collections-list">
|
|
<div class="wp-block-photography-core-section-header mwt-section-header">
|
|
<h3>Collections</h3>
|
|
<div class="line"></div>
|
|
</div>
|
|
<?php
|
|
foreach( $collections as $collection ) {
|
|
|
|
require get_template_directory() . '/components/collection-card.php';
|
|
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
|
|
$folders = $photocore->get_folders($term_id);
|
|
if( count( $folders ) != 0 ) {
|
|
?>
|
|
<div class="large-container">
|
|
<div class="folders-list">
|
|
<div class="wp-block-photography-core-section-header mwt-section-header">
|
|
<h3>Folders</h3>
|
|
<div class="line"></div>
|
|
</div>
|
|
<?php
|
|
foreach( $folders as $folder ) {
|
|
|
|
require get_template_directory() . '/components/folder-card.php';
|
|
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
} ?>
|
|
</div>
|
|
|
|
|
|
|
|
</main><!-- #main -->
|
|
</div><!-- #primary -->
|
|
|
|
<?php
|
|
get_footer();
|