Created
November 29, 2012 09:23
-
-
Save martinsteel/4167781 to your computer and use it in GitHub Desktop.
WordPress Service Status single
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 | |
get_header(); | |
?> | |
<div class="group" id="Intro"> | |
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> | |
<h1>Service Status - <?php the_date("jS M Y"); ?></h1> | |
<p>This update was written by <?php the_author_posts_link(); ?> at <?php echo get_the_date('g:ia'); ?></p> | |
</div> | |
<div class="group"> | |
<div class="column column-one"> | |
<div id="post-<?php the_ID(); ?>" <?php post_class('curve'); ?>> | |
<div class="entry"> | |
<h2><?php the_title();?></h2> | |
<?php the_content(); ?> | |
<?php the_tags( '<div id="Tags"><h2>Tags</h2><ul><li>', '</li><li>', '</li></ul></div>'); ?> | |
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> | |
</div> | |
<?php | |
$terms = get_the_terms( $post->ID, 'products' ); | |
if ( !is_wp_error($terms) && $terms !=null && count($terms) > 0) { ?> | |
<div class="service-status-products"> | |
<h3>Services affected:</h3> | |
<ul> | |
<?php | |
foreach ($terms as $term) { | |
printf('<li>%s</li>', $term->name); | |
} | |
?> | |
</ul> | |
</div> | |
<?php } ?> | |
</div> | |
</div> | |
<?php get_sidebar(); ?> | |
</div> | |
<?php endwhile; else: ?> | |
<p>Sorry, no status updates matched your criteria.</p> | |
<?php endif; ?> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment