1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
function render_content() {
if ( have_posts() ) :
?>
<div class="loop">
<div class="loop-header">
<?php echo wp_kses_post( epl_property_author_box() ); ?>
<h4 class="loop-title">
<?php
the_post();
if ( is_category() ) {
$title = sprintf( __( 'Archive for %s', 'easy-property-listings' ), single_cat_title( '', false ) );
} elseif ( is_tag() ) {
$title = sprintf( __( 'Archive for %s', 'easy-property-listings' ), single_tag_title( '', false ) );
} elseif ( is_tax() ) {
$term = get_queried_object();
$title = sprintf( __( 'Archive for %s', 'easy-property-listings' ), $term->name );
} elseif ( function_exists( 'is_post_type_archive' ) && is_post_type_archive() && function_exists( 'post_type_archive_title' ) ) {
$title = post_type_archive_title( '', false );
} elseif ( is_author() ) {
$title = sprintf( __( 'Author Archive for %s', 'easy-property-listings' ), get_the_author() );
} elseif ( is_year() ) {
$title = sprintf( __( 'Archive for %s', 'easy-property-listings' ), get_the_time( 'Y' ) );
} elseif ( is_month() ) {
$title = sprintf( __( 'Archive for %s', 'easy-property-listings' ), get_the_time( 'F Y' ) );
} elseif ( is_day() ) {
$title = sprintf( __( 'Archive for %s', 'easy-property-listings' ), get_the_date() );
} elseif ( is_time() ) {
$title = __( 'Time Archive', 'easy-property-listings' );
} else {
$title = __( 'Archive', 'easy-property-listings' );
}
if ( is_paged() ) {
printf( '%s – Page %d', esc_attr( $title ), esc_attr( get_query_var( 'paged' ) ) );
} else {
echo esc_attr( $title );
}
rewind_posts();
?>
</h4>
</div>
<div class="loop-content">
<?php
while ( have_posts() ) :
the_post();
?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- title, meta, and date info -->
<div class="entry-header clearfix">
<h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<div class="entry-meta">
<?php
printf( esc_html__( 'By %s', 'easy-property-listings' ), '<span class="meta-author">' . wp_kses_post( get_the_author_link() ) . '</span>' );
do_action( 'builder_comments_popup_link', '<span class="meta-comments">· ', '</span>', esc_html__( 'Comments %s', 'easy-property-listings' ), esc_html__( '(0)', 'easy-property-listings' ), esc_html__( '(1)', 'easy-property-listings' ), esc_html__( '(%)', 'easy-property-listings' ) );
?>
</div>
<div class="entry-meta date">
<span class="weekday"><?php the_time( 'l' ); ?><span class="weekday-comma">,</span></span>
<span class="month"><?php the_time( 'F' ); ?></span>
<span class="day"><?php the_time( 'j' ); ?><span class="day-suffix"><?php the_time( 'S' ); ?></span><span class="day-comma">,</span></span>
<span class="year"><?php the_time( 'Y' ); ?></span>
</div>
</div>
<!-- post content -->
<div class="entry-content clearfix">
<?php the_excerpt(); ?>
</div>
<!-- categories, tags and comments -->
<div class="entry-footer clearfix">
<?php
do_action( 'builder_comments_popup_link', '<div class="entry-meta alignright"><span class="comments">', '</span></div>', esc_html__( 'Comments %s', 'easy-property-listings' ), esc_html__( '(0)', 'easy-property-listings' ), esc_html__( '(1)', 'easy-property-listings' ), esc_html__( '(%)', 'easy-property-listings' ) );
?>
<div class="entry-meta alignleft">
<div class="categories">
<?php
printf( esc_html__( 'Categories : %s', 'easy-property-listings' ), wp_kses_post( get_the_category_list( ', ' ) ) );
?>
</div>
<?php the_tags( '<div class="tags">' . esc_html__( 'Tags : ', 'easy-property-listings' ), ', ', '</div>' ); ?>
</div>
</div>
</div>
<!-- end .post -->
<?php
comments_template();
endwhile;
?>
</div>
<div class="loop-footer">
<!-- Previous/Next page navigation -->
<div class="loop-utility clearfix">
<div class="alignleft"><?php previous_posts_link( __( '« Previous Page', 'easy-property-listings' ) ); ?></div>
<div class="alignright"><?php next_posts_link( __( 'Next Page »', 'easy-property-listings' ) ); ?></div>
</div>
</div>
</div>
<?php
else :
do_action( 'builder_template_show_not_found' );
endif;
}
add_action( 'builder_layout_engine_render_content', 'render_content' );
do_action( 'builder_layout_engine_render', basename( __FILE__ ) );