Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The widget template for displaying information posts
- */
- global $widget_args;
- $postid = $widget_args['postid'];
- $thumbnail = $widget_args['thumbnail'];
- $excerpt = $widget_args['excerpt'];
- $uid = $widget_args['uid'];
- $post_args = array(
- 'p' => $postid,
- 'post_type' => 'information',
- 'post_status' => 'publish',
- );
- $post_query = new WP_Query( $post_args );
- if ( $post_query->have_posts() ) : ?>
- <?php while ( $post_query->have_posts() ) : $post_query->the_post(); ?>
- <article id="post-<?php the_ID(); ?><?php echo $uid; ?>" <?php post_class(); ?>>
- <?php /* Do we have a thumbnail to display? */ ?>
- <?php if( !$thumbnail && has_post_thumbnail() ) : ?>
- <div class="info-thumb aligncenter">
- <?php the_post_thumbnail( 'info-thumb' ); ?>
- </div>
- <?php endif; ?>
- <?php if( $excerpt ) : ?>
- <?php the_excerpt(); ?>
- <?php else: ?>
- <?php the_content(); ?>
- <?php endif; ?>
- </article>
- <div class="cleared"></div>
- <?php endwhile; ?>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement