work on wingle articles
This commit is contained in:
68
singular.php
68
singular.php
@@ -22,24 +22,27 @@
|
||||
|
||||
<div class="metadata">
|
||||
<?php if (!is_page()): ?>
|
||||
<div class="time-cat">
|
||||
<?php the_time('Y. m. d.');?> |
|
||||
<?php the_category(' | ');?>
|
||||
<div class="metaWrapper">
|
||||
<div class="time-cat">
|
||||
<?php the_time('Y. m. d.');?> |
|
||||
<?php the_category(' | ');?>
|
||||
</div>
|
||||
<div class="format">
|
||||
<?php
|
||||
$terms = get_the_terms( $post->ID, 'Format' );
|
||||
if ($terms && ! is_wp_error( $terms )) {
|
||||
foreach($terms as $term) {
|
||||
?>
|
||||
<a href="<?php echo esc_url(get_term_link( $term));?>">
|
||||
<?php
|
||||
echo $term->name;
|
||||
echo '</a>';
|
||||
}
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="format">
|
||||
<?php
|
||||
$terms = get_the_terms( $post->ID, 'Format' );
|
||||
if ($terms && ! is_wp_error( $terms )) {
|
||||
foreach($terms as $term) {
|
||||
?>
|
||||
<a href="<?php echo esc_url(get_term_link( $term));?>">
|
||||
<?php
|
||||
echo $term->name;
|
||||
echo '</a>';
|
||||
}
|
||||
} ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<h1 class="single-title">
|
||||
<?php the_title();?>
|
||||
@@ -91,43 +94,18 @@
|
||||
);
|
||||
|
||||
$my_query = new wp_query( $args );
|
||||
console_debug($my_query);
|
||||
//console_debug($my_query);
|
||||
if( $my_query->have_posts() ) {
|
||||
?>
|
||||
<div id="related_posts"><h3><?php _e('More posts:', 'dis2019');?></h3><ul>
|
||||
<?php
|
||||
while( $my_query->have_posts() ) {
|
||||
$my_query->the_post();
|
||||
static $relatedloop = true;
|
||||
?>
|
||||
|
||||
<li>
|
||||
<?php if (has_post_thumbnail()): // Check if thumbnail exists ?>
|
||||
<a class="related_thumbnailwrapper" href="<?php the_permalink();?>" title="<?php the_title();?>">
|
||||
<?php the_post_thumbnail('home-square-thumbnail'); ?>
|
||||
</a>
|
||||
<?php endif;?>
|
||||
<!-- /post thumbnail -->
|
||||
|
||||
<div class="metadata">
|
||||
<div class="categories">
|
||||
<?php
|
||||
foreach((get_the_category()) as $category){
|
||||
echo $category->name;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="vr"></div>
|
||||
<div class="postedon">
|
||||
'<?php the_time('y.m.d.');?>
|
||||
</div>
|
||||
<div class="filler"></div>
|
||||
</div> <!-- metadata end -->
|
||||
<!-- post title -->
|
||||
<h2>
|
||||
<a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title();?></a>
|
||||
</h2>
|
||||
<!-- /post title -->
|
||||
<?php include( locate_template( 'loop-inner.php', false, false ) ); ?>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user