This repository has been archived by the owner. It is now read-only.
Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
neag/content-news-archive.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
42 lines (36 sloc)
1.76 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This is used when viewing the news archive. | |
?> | |
<article id="post-<?php the_ID(); ?>" class="news-archive-story"> | |
<header class="entry-header"> | |
<div class="news-archive-preview-wrapper"> | |
<div class="image-wrapper"> | |
<a href="<?php the_permalink() ?>"><?php the_post_thumbnail('medium') ?></a> | |
</div> | |
<a href="<?php the_permalink() ?>"><?php the_title( '<h1 class="entry-title">', '</h1>' ); ?></a> | |
<p>by: <strong class="less-strong"><?php the_author() ?></strong> <span class="news-story-date"><?php the_time('F j, Y'); ?></span></p> | |
<?php the_excerpt() ?> | |
<!-- <?php the_tags('<ul><li>', '</li><li>', '</li></ul>') ?> | |
<?php the_category() ?> --> | |
<ul class="post-categories"> | |
<?php | |
$categories = get_the_category(); | |
$separator = ' '; | |
$output = ''; | |
if($categories){ | |
foreach($categories as $category) { | |
if($category->name !== 'Uncategorized') | |
if($category->name !== 'Home-Featured') | |
if($category->name !== 'News Featured') | |
{ | |
$output .= '<li><a href="'.get_category_link( $category->term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '">'.$category->cat_name.'</a></li>'.$separator; } | |
} | |
echo trim($output, $separator); | |
} | |
?> | |
</ul> | |
</div> | |
</header><!-- .entry-header --> | |
<div class="entry-content clearfix subpage"> | |
</div><!-- .entry-content --> | |
</article><!-- #post-## --> |