Advertisement
Guest User

Untitled

a guest
Dec 10th, 2014
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4.  
  5.  
  6. global $post, $query_string, $SMTheme;
  7.  
  8. if (have_posts()) :
  9.  
  10.  
  11.  
  12.  
  13. if (!isset($_GET['ajaxpage'])) {?> <div class='articles'> <?php }
  14.  
  15.  
  16. while (have_posts()) : the_post(); ?>
  17. <div class='one-post'>
  18. <div id="post-<?php the_ID(); ?>" <?php post_class("post-caption"); ?>>
  19. <?php //Title
  20. if (!is_single()&&!is_page()) { ?>
  21. <h2><a href="<?php the_permalink(); ?>" title="<?php printf( $SMTheme->_( 'permalink' ), the_title_attribute( 'echo=0' ) ); ?>" class='post_ttl'><?php the_title(); ?></a></h2>
  22. <?php } else { ?>
  23. <h1><?php the_title(); ?></h1>
  24. <?php } ?>
  25.  
  26.  
  27.  
  28. </div>
  29. <div class='post-body'>
  30.  
  31.  
  32.  
  33.  
  34.  
  35. <?php // Post featured image
  36. if(has_post_thumbnail()) {
  37. if (!is_single()){ ?><a href="<?php the_permalink(); ?>" title="<?php printf( $SMTheme->_( 'permalink' ), the_title_attribute( 'echo=0' ) ); ?>"> <?php }
  38. the_post_thumbnail(
  39. array(308, 267),
  40. array("class" => $SMTheme->get( 'layout','imgpos' ) . " featured_image")
  41. );
  42. if (!is_single()){ ?></a><?php }
  43. }
  44.  
  45. ?>
  46.  
  47.  
  48.  
  49. <?php
  50. //Post meta (comments, date, categories)
  51. if (!is_page()) {?><p class='post-meta'>
  52.  
  53.  
  54.  
  55. <?php echo $SMTheme->_('before-category'); ?><?php the_category(', ');
  56.  
  57. if(comments_open( get_the_ID() )) {
  58. ?>
  59. <span class='post-date'><?php echo get_the_date(); ?></span>
  60. <img alt="" src="<?php echo get_template_directory_uri(); ?>/images/smt/comments.png" class="meta-com-img"><span class="meta_comments"><?php comments_popup_link( $SMTheme->_( 'noresponses' ), $SMTheme->_( 'oneresponse' ), $SMTheme->_( 'multiresponse' ) ); ?></span>
  61. <?php }
  62. edit_post_link( $SMTheme->_( 'edit' ), ' | <span class="edit-link">', '</span>' );
  63. ?>
  64. </p><?php } ?>
  65.  
  66.  
  67.  
  68. <?php
  69. //Post content
  70. if (!is_single()&&!is_page()) {
  71. smtheme_excerpt('echo=1');
  72. ?><a href='<?php the_permalink(); ?>' class='readmore'><?php echo $SMTheme->_( 'readmore' ); ?></a><?php
  73. } else {
  74. the_content('');
  75. }
  76. wp_link_pages(); ?>
  77. </div>
  78. </div>
  79.  
  80.  
  81.  
  82.  
  83. <?php endwhile; ?>
  84.  
  85.  
  86. <?php if (!isset($_GET['ajaxpage'])) {?></div><?php } ?>
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement