Advertisement
Guest User

Covell archive

a guest
Sep 14th, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.42 KB | None | 0 0
  1. <?php
  2.  
  3. function render_content() {
  4.     global $wp_theme_options;
  5.  
  6. ?>
  7.     <script type="text/javascript">
  8.         jQuery(document).ready(function() {
  9.             jQuery(".front-page-thumbnail img").hover(
  10.                 function () {
  11.                     jQuery(this).stop().fadeTo("fast", 0.7);
  12.                 },
  13.                 function () {
  14.                     jQuery(this).stop().fadeTo("fast", 1);
  15.                 }
  16.             );
  17.         });
  18.     </script>
  19.  
  20.     <?php if ( have_posts() ) : ?>
  21.         <div class="loop">
  22.             <div class="loop-header clearfix">
  23.                 <h3 class="loop-title">
  24.                     <?php
  25.                         the_post();
  26.  
  27.                         if ( is_category() ) { // Category Archive
  28.                             $title = sprintf( __( 'Archive for %s', 'it-l10n-BuilderChild-Covell' ), single_cat_title( '', false ) );
  29.                         }
  30.                         else if ( is_tag() ) { // Tag Archive
  31.                             $title = sprintf( __( 'Archive for %s', 'it-l10n-BuilderChild-Covell' ), single_tag_title( '', false ) );
  32.                         }
  33.                         else if ( is_tax() ) { // Tag Archive
  34.                             $title = sprintf( __( 'Archive for %s', 'it-l10n-BuilderChild-Covell' ), builder_get_tax_term_title() );
  35.                         }
  36.                         else if ( is_day() || is_time() ) { // Day-Specific Archive
  37.                             $title = sprintf( __( 'Archive for %s', 'it-l10n-BuilderChild-Covell' ), get_the_time() );
  38.                         }
  39.                         else if ( is_month() ) { // Month-Specific Archive
  40.                             $title = sprintf( __( 'Archive for %s', 'it-l10n-BuilderChild-Covell' ), get_the_time( 'F Y' ) );
  41.                         }
  42.                         else if ( is_year() ) { // Year-Specific Archive
  43.                             $title = sprintf( __( 'Archive for %s', 'it-l10n-BuilderChild-Covell' ), get_the_time( 'Y' ) );
  44.                         }
  45.                         else if ( is_author() ) { // Author Archive
  46.                             $title = sprintf( __( 'Author Archive for %s', 'it-l10n-BuilderChild-Covell' ), get_the_author() );
  47.                         }
  48.                         else { // Default catchall just in case
  49.                             $title = __( 'Archive', 'it-l10n-BuilderChild-Covell' );
  50.                         }
  51.  
  52.                         if ( is_paged() )
  53.                             printf( '%s &ndash; Page %d', $title, get_query_var( 'paged' ) );
  54.                         else
  55.                             echo $title;
  56.  
  57.                         rewind_posts();
  58.                     ?>
  59.                 </h3>
  60.             </div>
  61.  
  62.             <div class="loop-content">
  63.                 <?php while ( have_posts() ) : // The Loop ?>
  64.                     <?php the_post(); ?>
  65.  
  66.                     <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  67.                         <div class="entry-header">
  68.                             <h3 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
  69.  
  70.                             <div class="entry-meta">
  71.                                 <?php printf( __( 'By %s', 'it-l10n-BuilderChild-Covell' ), '<span class="author">' . builder_get_author_link() . '</span>' ); ?>
  72.                                 <?php printf( __( ' on %s', 'it-l10n-BuilderChild-Covell' ), '<span class="date">' . get_the_date() . '</span>' ); ?>
  73.                                 <?php edit_post_link( 'Edit', ' <span class="">&middot; ', '</span>' ); ?>
  74.                                 <?php do_action( 'builder_comments_popup_link', '<span class="comments right">', '</span>', __( '%s Comments', 'it-l10n-BuilderChild-Covell' ), __( 'No', 'it-l10n-BuilderChild-Covell' ), __( '1', 'it-l10n-BuilderChild-Covell' ), __( '%', 'it-l10n-BuilderChild-Covell' ) ); ?>
  75.                             </div>
  76.                         </div>
  77.  
  78.                         <!--post text with the read more link -->
  79.                         <div class="entry-summary">
  80.                             <?php the_excerpt(); ?>
  81.                         </div>
  82.  
  83.                         <!-- categories, tags and comments -->
  84.                         <div class="entry-footer clearfix">
  85.                             <div class="entry-meta">
  86.                                 <div class="categories left"><?php printf( __( 'Categories : %s', 'it-l10n-BuilderChild-Covell' ), get_the_category_list( ', ' ) ); ?></div>
  87.                                 <?php the_tags( '<div class="tags right">' . __( 'Tags : ', 'it-l10n-BuilderChild-Covell' ), ', ', '</div>' ); ?>
  88.                             </div>
  89.                         </div>
  90.                     </div>
  91.                 <?php endwhile; // end of one post ?>
  92.             </div>
  93.  
  94.             <div class="loop-footer">
  95.                 <!-- Previous/Next page navigation -->
  96.                 <div class="loop-utility paging clearfix">
  97.                     <div class="alignleft"><?php previous_posts_link( __( '&laquo; Previous Page', 'it-l10n-BuilderChild-Covell' ) ); ?></div>
  98.                     <div class="alignright"><?php next_posts_link( __( 'Next Page &raquo;', 'it-l10n-BuilderChild-Covell' ) ); ?></div>
  99.                 </div>
  100.             </div>
  101.         </div>
  102.     <?php else : // do not delete ?>
  103.         <?php do_action( 'builder_template_show_not_found' ); ?>
  104.     <?php endif; // do not delete ?>
  105. <?php
  106.  
  107. }
  108.  
  109. add_action( 'builder_layout_engine_render_content', 'render_content' );
  110.  
  111. do_action( 'builder_layout_engine_render', basename( __FILE__ ) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement