Advertisement
Guest User

Loop on Geek for i

a guest
Apr 9th, 2012
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. <?php /* Main Loop */ ?>
  2. <?php global $framework; ?>
  3.  
  4. <?php if( is_front_page() ) : ?>
  5. <?php query_posts("posts_per_page=3&category_name=featured");?>
  6. <?php while (have_posts()) : the_post(); ?>
  7. <div class="featureportfolio<?php echo $i++;?>">
  8. <a href="<?php the_permalink() ?>" rel="bookmark" class="title">
  9. <?php the_post_thumbnail('thumbnail'); ?>
  10. <div class="info">
  11. <a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a>
  12. </div>
  13. </div>
  14. <?php endwhile;?>
  15. <?php endif; ?>
  16. <div class="clear"></div>
  17. <?php wp_reset_query(); ?>
  18.  
  19. <div id="post-<?php the_ID(); ?>" <?php post_class('post format-standard'); ?>>
  20.  
  21. <div class="post-header">
  22. <?php if ( has_post_thumbnail()) { ?>
  23. <?php if((is_single() || is_page()) && $framework->get_option('post_thumbnails_on_single') == 'on') { ?>
  24. <div class="thumbnail alignleft">
  25. <?php the_post_thumbnail('thumbnail'); ?>
  26. </div> <!-- /.thumbnail -->
  27. <?php } else if((is_home() || is_archive()) && $framework->get_option('post_thumbnails_on_index') == 'on') { ?>
  28. <div class="thumbnail alignleft">
  29. <a class="thumbnail-link fademe" href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
  30. <?php the_post_thumbnail('thumbnail'); ?>
  31. </a>
  32. </div> <!-- /.thumbnail -->
  33. <?php } // end if ?>
  34. <?php } //end if ?>
  35. <div class="title-wrap">
  36. <?php if(is_single() || is_page()) { ?>
  37. <h1 class="post-title"><?php the_title(); ?></h1>
  38. <?php } else { ?>
  39. <h2 class="post-title">
  40. <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>
  41. </h2>
  42. <?php } // end if ?>
  43.  
  44. <div class="post-header-meta">
  45. <?php if(strlen(trim(get_the_title())) === 0) { ?>
  46. <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><span class="the-time"><?php the_time('F j, Y'); ?></span></a>
  47. <?php } else { ?>
  48. <span class="the-time"><?php the_time('F j, Y'); ?></span>
  49. <?php } // end if/else ?>
  50. <?php if(comments_open()) { ?>
  51. <span class="the-comment-link">&mdash;&nbsp;<?php comments_popup_link(__('0 Comments','standard'), __('1 Comment','standard'), __('% Comments','standard'), '', ''); ?></span>
  52. <?php } // end if ?>
  53. </div><!-- /.post-header-meta -->
  54. </div><!-- /.title-wrap -->
  55. <div class="clear"></div>
  56. </div> <!-- /.post-header -->
  57.  
  58. <?php if ( is_search() ) { ?>
  59. <div id="content-<?php the_ID(); ?>" class="entry-summary">
  60. <?php the_excerpt(); ?>
  61. <div class="clear"></div>
  62. </div><!-- /.entry-summary -->
  63. <?php } else { ?>
  64.  
  65. <div id="content-<?php the_ID(); ?>" class="entry-content">
  66. <div class="content">
  67. <?php the_content(__('Continue Reading...','standard')); ?>
  68. </div>
  69. <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'standard' ) . '</span>', 'after' => '</div>' ) ); ?>
  70. <div class="clear"></div>
  71. </div><!-- /.entry-content -->
  72.  
  73. <?php if( !is_front_page() ) : ?>
  74. <center><script type="text/javascript"><!--
  75. google_ad_client = "ca-pub-6100602944884394";
  76. /* Bottom Post Ad */
  77. google_ad_slot = "9592556020";
  78. google_ad_width = 468;
  79. google_ad_height = 60;
  80. //-->
  81. </script>
  82. <script type="text/javascript"
  83. src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  84. </script></center>
  85. <?php endif; ?>
  86.  
  87. <div class="post-meta">
  88. <?php if(!isset($_GET['attachment_id'])) { ?>
  89. <?php _e('Tagged In','standard'); ?>
  90. <span class="the-category"><?php the_category(', '); ?></span>
  91. <span class="the-tags"><?php the_tags('', ', ', ''); ?> </span>
  92. <?php } ?>
  93. </div> <!-- /.post-meta -->
  94.  
  95. <?php } // end if ?>
  96. </div> <!-- /#post- -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement