This repository has been archived on 2019-06-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
io-theme-2019/category.php
2019-06-09 16:44:48 +02:00

92 lines
1.9 KiB
PHP
Executable File

<?php get_header(); ?>
<main role="main">
<!-- section -->
<div class="tag-list">
<span class="tag-filter">
<a>FILTER</a>
<span class="tag-dummy"></span>
<object data="<?php echo get_template_directory_uri(); ?>/img/arrow.svg" type="image/svg+xml">
<img src="<?php echo get_template_directory_uri(); ?>/img/arrow.png" />
</object>
</span>
<div class="tag-wrapper">
<?php
$tagargs =array(
'exclude' => array(
get_term_by('slug', 'award', 'post_tag')->term_id,
get_term_by('slug', 'publication', 'post_tag')->term_id,
),
);
$tags = get_tags($tagargs);
$html = '<ul class="post_tags">';
foreach ( $tags as $tag ) {
$tag_link = get_tag_link( $tag->term_id );
$html .= "<li><a href='{$tag_link}' title='{$tag->name} Tag' class='{$tag->slug}'>";
$html .= "{$tag->name}</a></li>";
}
$html .= '</ul>';
echo $html;
?>
</div>
</div>
<section>
<?php if (have_posts()): while (have_posts()) : the_post(); ?>
<!-- article -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- post thumbnail -->
<?php if ( has_post_thumbnail()) : // Check if thumbnail exists ?>
<div class="thumbnail-wrapper">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail('projects-thumb'); ?>
</a>
</div>
<?php endif; ?>
<!-- /post thumbnail -->
<!-- post title -->
<h2 class="project-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>
<!-- /post title -->
</article>
<!-- /article -->
<?php endwhile; ?>
<?php else: ?>
<!-- article -->
<article>
<h2>
<?php _e( 'Sorry, nothing to display.', 'iotheme' ); ?>
</h2>
</article>
<!-- /article -->
<?php endif; ?>
</section>
<!-- /section -->
</main>
<?php get_footer(); ?>