-
Notifications
You must be signed in to change notification settings - Fork 14
/
archive-property.php
68 lines (56 loc) · 2.22 KB
/
archive-property.php
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
<?php get_header(); ?>
<div class="row">
<div class="content <?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-sm-8 col-md-9<?php else : ?>col-sm-12<?php endif; ?>">
<?php dynamic_sidebar( 'sidebar-content-top' ); ?>
<?php if ( have_posts() ) : ?>
<header class="page-header">
<?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?>
<?php the_archive_description( '<div class="taxonomy-description">', '</div>' ); ?>
</header><!-- .page-header -->
<?php
/**
* realia_before_property_archive
*/
do_action( 'realia_before_property_archive' );
?>
<?php if ( get_theme_mod( 'realia_general_show_property_archive_as_grid', null ) == '1' ) : ?>
<div class="property-box-archive type-box item-per-row-3">
<div class="properties-row">
<?php endif; ?>
<?php $index = 0; ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php if ( get_theme_mod( 'realia_general_show_property_archive_as_grid', null ) == '1' ) : ?>
<div class="property-container">
<?php echo Realia_Template_Loader::load( 'properties/box' ); ?>
</div><!-- /.property-container -->
<?php if ( 0 == ( ( $index + 1 ) % 3 ) && Realia_Query::loop_has_next() ) : ?>
</div><div class="properties-row">
<?php endif; ?>
<?php else : ?>
<?php echo Realia_Template_Loader::load( 'properties/row' ); ?>
<?php endif; ?>
<?php $index++; ?>
<?php endwhile; ?>
<?php if ( get_theme_mod( 'realia_general_show_property_archive_as_grid', null ) == '1' ) : ?>
</div><!-- /.properties-row -->
</div><!-- /.property-box-archive -->
<?php endif; ?>
<?php
/**
* realia_after_property_archive
*/
do_action( 'realia_after_property_archive' );
?>
<?php the_posts_pagination( array(
'prev_text' => __( 'Previous page', 'realia' ),
'next_text' => __( 'Next page', 'realia' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'realia' ) . ' </span>',
) ); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
<?php dynamic_sidebar( 'sidebar-content-bottom' ); ?>
</div><!-- /.content -->
<?php get_sidebar(); ?>
</div><!-- /.row -->
<?php get_footer(); ?>