work on wingle articles

This commit is contained in:
infeeeee
2019-08-07 22:54:34 +02:00
parent 8e00b8717b
commit 5a234f87e1
10 changed files with 438 additions and 306 deletions

View File

@@ -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
}