Gallerific - Single post without sidebar


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php $theme_options = get_option('gallerific_theme'); ?>
  2. <?php get_header(); ?>
  3.  
  4. <div class="container_12">
  5.  
  6. <div class="grid_12 full-wrap">
  7. <div class="content-wrap large">
  8.  
  9. <div id="content">
  10. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  11.  
  12. <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
  13. <h2><?php the_title(); ?></h2>
  14.  
  15. <div class="entry">
  16.  
  17. <?php // Get current category ID
  18. foreach(get_the_category() as $category) { $thecat = $category->cat_ID; } ?>
  19.  
  20. <? if ($theme_options['cat_setting_'.$thecat] == "portfolio") { ?>
  21. <?php if( get_post_meta($post->ID, "post_image_value", true) ) { ?>
  22. <img class="portfolio-full" src="<?php bloginfo('template_url'); ?>/image.php?width=880&amp;image=<? echo get_post_meta($post->ID, 'post_image_value', true) ?>" alt="<? the_title() ?>" />
  23. <? } ?>
  24. <? } ?>
  25.  
  26. <?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>
  27.  
  28. <?php //wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
  29.  
  30. <div class="meta-area">
  31. <?php the_tags( '<div class="tags">Tags: ', ', ', '</div>'); ?>
  32.  
  33. <small>
  34. This entry was posted
  35. <?php /* This is commented, because it requires a little adjusting sometimes.
  36.   You'll need to download this plugin, and follow the instructions:
  37.   http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
  38. /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
  39. on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
  40. and is filed under <?php the_category(', ') ?>.
  41. You can follow any responses to this entry through the <?php post_comments_feed_link('RSS 2.0'); ?> feed.
  42.  
  43. <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
  44. // Both Comments and Pings are open ?>
  45. You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site.
  46.  
  47. <?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
  48. // Only Pings are Open ?>
  49. Responses are currently closed, but you can <a href="<?php trackback_url(); ?> " rel="trackback">trackback</a> from your own site.
  50.  
  51. <?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
  52. // Comments are open, Pings are not ?>
  53. You can skip to the end and leave a response. Pinging is currently not allowed.
  54.  
  55. <?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
  56. // Neither Comments, nor Pings are open ?>
  57. Both comments and pings are currently closed.
  58.  
  59. <?php } ?><? edit_post_link('Edit this entry','<br /><br /><strong>','</strong>.'); ?>
  60.  
  61. </small>
  62. </div>
  63.  
  64. </div>
  65. </div>
  66.  
  67. <div class="navigation border">
  68. <div class="alignleft"><?php previous_post_link('%link','<strong>PREVIOUS:</strong> %title',TRUE) ?></div>
  69. <div class="alignright"><?php next_post_link('%link','<strong>NEXT:</strong> %title',TRUE) ?></div>
  70. <div class="clear"></div>
  71. </div>
  72.  
  73. <?php comments_template(); ?>
  74.  
  75. <?php endwhile; else: ?>
  76.  
  77. <p>Sorry, no posts matched your criteria.</p>
  78.  
  79. <?php endif; ?>
  80. </div>
  81.  
  82. </div>
  83. </div>
  84.  
  85. </div>
  86.  
  87. <?php get_footer(); ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.