initial commit
This commit is contained in:
84
category-press.php
Executable file
84
category-press.php
Executable file
@@ -0,0 +1,84 @@
|
||||
<?php get_header(); ?>
|
||||
|
||||
<main role="main">
|
||||
<!-- section -->
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<?php
|
||||
|
||||
|
||||
if (have_posts()):
|
||||
|
||||
|
||||
|
||||
$args = array(
|
||||
'category_name' => 'press',
|
||||
'meta_key' => 'project-date',
|
||||
'orderby' => 'meta_value_num',
|
||||
'order' => 'DESC',
|
||||
// 'meta_value' => date( "Y" ), // change to how "event date" is stored
|
||||
'meta_compare' => '>'
|
||||
);
|
||||
query_posts($args);
|
||||
|
||||
|
||||
while (have_posts()) :
|
||||
the_post();
|
||||
|
||||
|
||||
//if (have_posts()): while (have_posts()) : the_post();
|
||||
$key_project_date = get_post_meta(get_the_ID(), 'project-date', true);
|
||||
|
||||
?>
|
||||
|
||||
<!-- article -->
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class( 'date-'.$key_project_date); ?>>
|
||||
<div class="project-tags">
|
||||
|
||||
<?php the_tags( '', '', '' ); ?>
|
||||
</div>
|
||||
|
||||
<div class="project-date">
|
||||
<?php
|
||||
$key_project_date = get_post_meta(get_the_ID(), 'project-date', true);
|
||||
if ( ! empty( $key_project_date ) ) {
|
||||
echo $key_project_date;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="project-content">
|
||||
<?php
|
||||
the_content();
|
||||
the_post_thumbnail('projects-thumb');
|
||||
?>
|
||||
|
||||
</div>
|
||||
</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(); ?>
|
||||
Reference in New Issue
Block a user