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