2017-03-30 16:27:22 +02:00
|
|
|
<section data-post-type="<?= $attributes['post_type']; ?>" data-quantity="<?= $attributes['posts_per_page']; ?>" class="js-container-async ajax-posts">
|
2017-03-31 12:46:24 +02:00
|
|
|
<div class="ajax-posts__status" style="display:none;"></div>
|
2017-03-31 14:19:02 +02:00
|
|
|
<?php if ( $query->have_posts() && $query->post_count > 1) : ?>
|
|
|
|
<button class="js-toggle-filters ajax-posts__toggle-filter">
|
2020-07-08 16:05:18 +02:00
|
|
|
<span class="ajax-posts__filter-recipes-text">+ <?php printf( __('Mostra filtri %s', 'ajax-filter-posts'), $plural_post_name); ?></span>
|
|
|
|
<span class="ajax-posts__show-recipes-text">+ <?php printf( __('Mostra %s', 'ajax-filter-posts'), $plural_post_name); ?></span>
|
|
|
|
<span class="ajax-posts__hide-filters-text">- <?= __('Nascondi filtri', 'ajax-filter-posts'); ?></span>
|
2017-03-31 14:19:02 +02:00
|
|
|
</button>
|
|
|
|
<?php endif; ?>
|
2017-03-31 10:40:22 +02:00
|
|
|
<div class="ajax-posts__view">
|
|
|
|
<aside class="ajax-posts__filters">
|
2017-03-31 14:19:02 +02:00
|
|
|
<?php if ( $query->have_posts() && $query->post_count > 1) : ?>
|
2017-03-31 17:29:16 +02:00
|
|
|
<?php include( $this->get_local_template('partials/filters.php') ); ?>
|
2017-03-31 14:19:02 +02:00
|
|
|
<?php endif; ?>
|
2017-03-31 10:40:22 +02:00
|
|
|
</aside>
|
|
|
|
<div class="ajax-posts__posts">
|
2017-03-31 17:29:16 +02:00
|
|
|
<?php include( $this->get_local_template('partials/loop.php') ); ?>
|
2017-03-31 10:40:22 +02:00
|
|
|
</div>
|
2017-03-30 16:27:22 +02:00
|
|
|
</div>
|
|
|
|
<div class="ajax-posts__spinner">
|
2017-03-31 12:46:24 +02:00
|
|
|
<span class="ajax-posts__screen-reader-only"><?php _e('Loading', 'ajax-filter-posts'); ?></span>
|
2017-03-30 16:27:22 +02:00
|
|
|
</div>
|
|
|
|
</section>
|