Advertisement
Guest User

Untitled

a guest
Aug 21st, 2011
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  1. <?php
  2. // load the theme options
  3. $options = get_option( 'mx_theme_settings' );
  4. ?>
  5. <?php get_header(); ?>
  6. <div id="post-content">
  7. <div class="single-entry clearfix">
  8. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  9.  
  10. <h1><?php the_title(); ?></h1>
  11.  
  12. <div class="post-entry-meta">
  13. <span class="meta-date"><?php the_time('F jS, Y') ?></span><span class="meta-category"><?php the_category(' &bull; '); ?></span><span class="meta-comments"><?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?></span>
  14. </div>
  15. <!-- END post-entry-meta -->
  16. <?php if ( has_post_thumbnail() ) { ?>
  17. <?php if ($options['disable_single_image'] != true) { ?>
  18. <div id="single-featured-image">
  19. <?php the_post_thumbnail('post-image'); ?>
  20. </div><!-- END single-featured-image -->
  21. <?php } } ?>
  22. <?php the_content(); ?>
  23. <div class="clear"></div>
  24. <?php endwhile; ?>
  25. <?php endif; ?>
  26.  
  27. <?php wp_link_pages('before=<div id="post-page-navigation">&after=</div>'); ?>
  28.  
  29. <?php if ($options['disable_single_pagination'] != true) { ?>
  30. <div id="single-nav" class="clearfix">
  31. <div id="single-nav-left"><?php previous_post_link('%link', 'Previous Post', TRUE); ?></div>
  32. <div id="single-nav-right"><?php next_post_link('%link', 'Next Post', TRUE); ?></div>
  33. </div>
  34. <!-- END single-nav -->
  35. <?php } ?>
  36.  
  37. <div class="post-entry-bottom">
  38. <?php the_tags('<div class="post-tags">',' ','</div>'); ?>
  39. <!-- END post-category -->
  40. </div>
  41. <!-- END post-entry-bottom -->
  42.  
  43.  
  44. </div>
  45. <!-- END post-entry -->
  46.  
  47. <?php if ($options['disable_author'] != true) { ?>
  48. <div id="post-author" class="clearfix">
  49.  
  50. <div id="author-avatar">
  51. <?php echo get_avatar( get_the_author_email(), '50' ); ?>
  52. </div><!-- END author-avatar -->
  53.  
  54. <div id="author-description">
  55. <h4>About The Author</h4>
  56. <?php the_author_description(); ?>
  57. </div><!-- END author-description -->
  58. </div><!-- END post-author -->
  59. <?php } ?>
  60.  
  61. <?php if ($options['disable_related_posts'] != true) { ?>
  62. <div id="related-posts" class="clearfix">
  63. <h3>Related Posts</h3>
  64. <?php
  65. $category = get_the_category(); //get first current category ID
  66. $this_post = $post->ID; // get ID of current post
  67. $posts = get_posts('numberposts=3&orderby=rand&category=' . $category[0]->cat_ID . '&exclude=' . $this_post);
  68. ?>
  69.  
  70. <?php
  71. foreach($posts as $post) {
  72. ?>
  73. <?php if ( has_post_thumbnail() ) { ?>
  74. <div class="related-post clearfix">
  75. <div class="related-posts-thumbnail">
  76. <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="opacity"><?php the_post_thumbnail('related-posts'); ?></a>
  77. </div><!-- /related-posts-thumbnail -->
  78. <div class="related-posts-content">
  79. <h4><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4>
  80. <?php the_news_excerpt('20','','','plain','no'); ?>
  81. </div>
  82. <!-- /related-posts-content -->
  83. </div>
  84. <!-- /related-post -->
  85.  
  86. <?php } ?>
  87. <?php } wp_reset_postdata(); ?>
  88. </div><!-- END related-posts -->
  89. <div class="clear"></div>
  90. <?php } ?>
  91.  
  92. <?php comments_template(); ?>
  93.  
  94. </div>
  95. <!-- END post-content -->
  96.  
  97. <?php get_sidebar(); ?>
  98. <div class="clear"></div>
  99. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement