1. <?php
  2.  
  3. get_header();
  4.  
  5. $single_cat = get_the_category();
  6. $single_cat = $single_cat[0]->category_nicename;
  7. $single_cat_title = get_the_category();
  8. $single_cat_title = $single_cat_title[0]->cat_name;
  9.  
  10. ?>
  11.  
  12. <div id="show_hide_content_button"></div>
  13.  
  14. <div id="standard_page">
  15.  
  16. <?php echo '<h1 class="title">'.$single_cat_title."</h1>"; ?>
  17.  
  18. <div id="standard_body">
  19.  
  20. <?php
  21.  
  22. query_posts("category_name=$single_cat&paged=$paged");
  23.  
  24. if (have_posts()) : while(have_posts()) : the_post();
  25.  
  26. echo '<div class="blog_post">';
  27.  
  28. echo '<a href="' . get_permalink() . '"><h1>' . the_title('','',false) . '</h1></a>';
  29.  
  30. $image_id = get_post_thumbnail_id();
  31. $image_url = wp_get_attachment_image_src($image_id, 'full');
  32.  
  33. if (has_post_thumbnail()) :
  34.  
  35. ?>
  36.  
  37. <div id="portfolio_page_image"><a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php echo $image_url[0]; ?>&amp;w=690&amp;h=350&amp;zc=1&amp;q=100" alt="" /></a></div>
  38.  
  39. <?php
  40.  
  41. endif;
  42.  
  43. ?>
  44.  
  45. <div id="portfolio_page_body">
  46.  
  47. <?php
  48.  
  49. if(!empty($post->post_excerpt)) {
  50.  
  51. the_excerpt(get_option_tree('setting_rm','',false));
  52.  
  53. } else {
  54.  
  55. the_content(get_option_tree('setting_rm','',false));
  56.  
  57. }
  58.  
  59. ?>
  60.  
  61. </div>
  62.  
  63. <div id="portfolio_page_info">
  64.  
  65. <h3><?php echo get_option_tree('pp_info_title'); ?></h3>
  66.  
  67. <ul>
  68.  
  69. <li id="portfolio_page_date"><?php the_time('l, F j, Y'); ?></li>
  70. <li id="portfolio_page_author"><?php echo get_option_tree('pp_author')." <strong>"; the_author(); ?></strong></li>
  71. <?php if ($post_type != "gallery") : ?>
  72. <li id="portfolio_page_cat"><?php echo the_category(','); ?></li>
  73. <?php if (has_tag()) : ?>
  74. <li id="portfolio_page_tags"><?php echo the_tags('',', ',''); ?></li>
  75. <?php endif; ?>
  76. <li id="portfolio_page_comments"><?php echo comments_popup_link(get_option_tree('setting_ncm','',false),get_option_tree('setting_ocm','',false), "% ".get_option_tree('setting_ncmmto','',false), 'comment_counter', get_option_tree('setting_ncm','',false)); ?></li>
  77. <?php endif; ?>
  78. <?php locate_template( array( 'sidebar2.php' ), true ) ?>
  79.  
  80.  
  81. </ul>
  82.  
  83. </div>
  84.  
  85. <div class="clear"></div>
  86.  
  87. </div>
  88.  
  89. <?php
  90.  
  91. endwhile; endif;
  92.  
  93. ?>
  94.  
  95. <div id="post_links">
  96.  
  97. <div id="post_links_right">
  98.  
  99. <?php
  100.  
  101. if (get_next_posts_link()) {
  102.  
  103. next_posts_link(get_option_tree('setting_pgnnp','',false));
  104.  
  105. } else {
  106.  
  107. echo '<span class="no_post">' . get_option_tree('setting_pgnnnp','',false). '</span>';
  108.  
  109. }
  110.  
  111. ?>
  112.  
  113. </div>
  114.  
  115. <div id="post_links_left">
  116.  
  117. <?php
  118.  
  119. if (get_previous_posts_link()) {
  120.  
  121. previous_posts_link(get_option_tree('setting_pgnpp','',false));
  122.  
  123. } else {
  124.  
  125. echo '<span class="no_post">' . get_option_tree('setting_pgnnpp','',false) . '</span>';
  126.  
  127. }
  128.  
  129. ?>
  130.  
  131. </div>
  132.  
  133. </div>
  134.  
  135. <div class="clear"></div>
  136.  
  137. </div>
  138.  
  139. </div>
  140.  
  141. <?php
  142.  
  143. get_footer();
  144.  
  145. ?>