Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Test
- */
- ?>
- <?php get_header(); ?>
- <article>
- <?php
- $temp = $wp_query; $wp_query= null;
- $wp_query = new WP_Query(); $wp_query->query('showposts=5' . '&paged='.$paged);
- while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
- <div class='articles'>
- <div class='one-post'>
- <?php global $more; $more = 0; ?>
- <div class='post-body'>
- <?php // Post featured image
- if(has_post_thumbnail()) {
- if (!is_single()){ ?><a href="<?php the_permalink(); ?>" title="<?php printf( $SMTheme->_( 'permalink' ), the_title_attribute( 'echo=0' ) ); ?>"> <?php }
- the_post_thumbnail(
- array($SMTheme->get( 'layout', 'imgwidth' ), $SMTheme->get( 'layout', 'imgheight' )),
- array("class" => $SMTheme->get( 'layout','imgpos' ) . " featured_image")
- );
- if (!is_single()){ ?></a><?php }
- }
- ?>
- <div id="post-<?php the_ID(); ?>" <?php post_class("post-caption"); ?>>
- <?php //Title
- if (!is_single()&&!is_page()) { ?>
- <h2><a href="<?php the_permalink(); ?>" title="<?php printf( $SMTheme->_( 'permalink' ), the_title_attribute( 'echo=0' ) ); ?>" class='post_ttl'><?php the_title(); ?></a></h2>
- <?php } else { ?>
- <h1><?php the_title(); ?></h1>
- <?php }
- //Post meta (comments, date, categories)
- if (!is_page()) {?><p class='post-meta'>
- <span class='post-date'><?php echo get_the_date(); ?></span>
- Posted in <?php the_category(', ');
- edit_post_link( $SMTheme->_( 'edit' ), ' | <span class="edit-link">', '</span>' );
- if(comments_open( get_the_ID() )) {
- ?> <span class='post-comments'><?php comments_popup_link( $SMTheme->_( 'noresponses' ), $SMTheme->_( 'oneresponse' ), $SMTheme->_( 'multiresponse' ) ); ?></span>
- <?php } ?>
- </p><?php } ?>
- </div>
- <?php
- //Post content
- if (!is_single()&&!is_page()) {
- if ( ! post_password_required() ) { the_content(''); } else the_content('');
- ?><a href='<?php the_permalink(); ?>' class='readmore'><?php echo $SMTheme->_( 'readmore' ); ?></a><?php
- } else {
- the_content('');
- }
- wp_link_pages(); ?>
- </div>
- </div>
- </div>
- <?php endwhile; ?>
- <?php get_template_part('navigation'); ?>
- <?php if ($paged > 1) { ?>
- <?php } ?>
- <?php wp_reset_postdata(); ?>
- </article>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement