Yuzu Theme
from meowapps.com
This commit is contained in:
65
attachment.php
Normal file
65
attachment.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div id="primary" class="content-area">
|
||||
<main id="main" class="site-main">
|
||||
|
||||
<div class="single-attachment large-container top-and-bottom-margin">
|
||||
<?php
|
||||
$image_meta = wp_get_attachment_metadata($post->ID);
|
||||
$image_infos = get_post($post->ID);
|
||||
$image_src = wp_get_attachment_image_src($post->ID, 'full')[0];
|
||||
$image_title = $post->post_title;
|
||||
$image_description = $post->post_content;
|
||||
|
||||
$image_tags = get_the_terms($post, 'attachment_keyword');
|
||||
$tag_cloud_markup = "";
|
||||
if(count($image_tags) > 1) {
|
||||
$tag_cloud_markup = "<div class='mwt-keywords'><div class='mwt-tags-cloud'>";
|
||||
foreach($image_tags as $tag) {
|
||||
$tag_cloud_markup .= "<a class='tag' href='".get_term_link($tag)."'>
|
||||
".$tag->name."
|
||||
</a>";
|
||||
}
|
||||
$tag_cloud_markup .= "</div></div>";
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="page-header medium-container">
|
||||
<div class="label">
|
||||
<?php _e('Keyword', 'yuzu'); ?>
|
||||
</div>
|
||||
<h1 class="page-title"><?= get_the_title(); ?></h1>
|
||||
</div>
|
||||
|
||||
<div class="entry-content">
|
||||
<img src="<?php echo $image_src; ?>" style="display: block; margin: auto">
|
||||
<p>
|
||||
<?php if( has_excerpt() ) {
|
||||
echo get_the_excerpt();
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<div class="mwt-section-header">
|
||||
<h3><?php _e('Description', 'yuzu'); ?></h3>
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
<p>
|
||||
<?= $image_description; ?>
|
||||
</p>
|
||||
<div class="mwt-section-header">
|
||||
<h3><?php _e('Keywords', 'yuzu'); ?></h3>
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
<?php echo $tag_cloud_markup; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
?>
|
||||
Reference in New Issue
Block a user