Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function render_content() {
- global $posts;
- ?>
- <?php if ( have_posts() ) : ?>
- <div class="loop">
- <div class="loop-header">
- <h4 class="loop-title cat-page-title">
- <?php
- the_post();
- if ( is_category() ) { // Category Archive
- $title = sprintf( __( 'Archive for %s', 'it-l10n-BuilderChild-Classen' ), single_cat_title( '', false ) );
- }
- else if ( is_tag() ) { // Tag Archive
- $title = sprintf( __( 'Archive for %s', 'it-l10n-BuilderChild-Classen' ), single_tag_title( '', false ) );
- }
- else if ( is_tax() ) { // Tag Archive
- $title = sprintf( __( 'Archive for %s', 'it-l10n-BuilderChild-Classen' ), builder_get_tax_term_title() );
- }
- else if ( is_day() || is_time() ) { // Day-Specific Archive
- $title = sprintf( __( 'Archive for %s', 'it-l10n-BuilderChild-Classen' ), get_the_time() );
- }
- else if ( is_month() ) { // Month-Specific Archive
- $title = sprintf( __( 'Archive for %s', 'it-l10n-BuilderChild-Classen' ), get_the_time( 'F Y' ) );
- }
- else if ( is_year() ) { // Year-Specific Archive
- $title = sprintf( __( 'Archive for %s', 'it-l10n-BuilderChild-Classen' ), get_the_time( 'Y' ) );
- }
- else if ( is_author() ) { // Author Archive
- $title = sprintf( __( 'Author Archive for %s', 'it-l10n-BuilderChild-Classen' ), get_the_author() );
- }
- else { // Default catch all just in case
- $title = __( 'Archive', 'it-l10n-BuilderChild-Classen' );
- }
- if ( is_paged() )
- printf( '%s – Page %d', $title, get_query_var( 'paged' ) );
- else
- echo $title;
- rewind_posts();
- ?>
- </h4>
- </div>
- <div class="loop-content">
- <?php while ( have_posts() ) : // The Loop ?>
- <?php the_post(); ?>
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <!-- title, meta, and date info -->
- <div class="entry-header clearfix">
- <div class="entry-meta leftmetabox">
- <?php if (has_post_thumbnail()) { ?>
- <div class="front-page-thumbnail">
- <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail( 'front-page-thumbnail' ); ?></a>
- </div>
- <?php } ?>
- <div class="date">
- <span class="month"><?php the_time( 'n' ); ?></span> /
- <span class="day"><?php the_time( 'j' ); ?><span class="day-comma"> /</span></span>
- <span class="year"><?php the_time( 'y' ); ?></span><br />
- </div>
- <div class="author-meta">
- <?php printf( __( '%s', 'it-l10n-BuilderChild-Classen' ), '<span class="meta-author">' . builder_get_author_link() . '</span>' ); ?>
- <div class="author-gravatar">
- <?php echo get_avatar( get_the_author_meta( 'ID' ), '68' ); ?>
- </div>
- </div>
- <!-- categories, tags and comments -->
- <div class="entry-meta clearfix">
- <span class="categories"><?php printf( __( 'Categories<br /> %s', 'it-l10n-BuilderChild-Classen' ), get_the_category_list( '<br /> ' ) ); ?></span><br />
- <?php do_action( 'builder_comments_popup_link', '<span class="comments">', '</span>', __( ' %s <br />comments', 'it-l10n-BuilderChild-Classen' ), __( '0', 'it-l10n-BuilderChild-Classen' ), __( '1', 'it-l10n-BuilderChild-Classen' ), __( '%', 'it-l10n-BuilderChild-Classen' ) ); ?>
- </div>
- </div>
- <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
- <!-- "Read More" link -->
- <div class="entry-content">
- <?php the_content( __( 'Read More→', 'it-l10n-BuilderChild-Classen' ) ); ?>
- <?php wp_link_pages( array( 'before' => '<p class="entry-utility"><strong>' . __( 'Pages:', 'it-l10n-BuilderChild-Classen' ) . '</strong> ', 'after' => '</p>', 'next_or_number' => 'number' ) ); ?>
- </div>
- </div>
- </div>
- <?php comments_template(); // include comments template ?>
- <?php endwhile; // end of one post ?>
- </div><!-- end of loop-content div -->
- <div class="loop-footer">
- <!-- Previous/Next page navigation -->
- <div class="loop-utility clearfix">
- <div class="alignleft"><?php previous_posts_link( __( '« Previous Page', 'it-l10n-BuilderChild-Classen' ) ); ?></div>
- <div class="alignright"><?php next_posts_link( __( 'Next Page »', 'it-l10n-BuilderChild-Classen' ) ); ?></div>
- </div>
- </div>
- </div><!-- end of loop div -->
- <?php else : // do not delete ?>
- <?php do_action( 'builder_template_show_not_found' ); ?>
- <?php endif; // do not delete ?>
- <?php
- }
- add_action( 'builder_layout_engine_render_content', 'render_content' );
- do_action( 'builder_layout_engine_render', basename( __FILE__ ) );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement