Pagination disappears
-
Hello! When I select a filter option, the pagination disappears.
The container has the IDmain_content
.<section class="apartments mt-80">
<div class="container">
<div class="apartments__content fe-plugin-container id="main_content">
<div class="apartments__content-list" ">
<?php
while ($query->have_posts()) {
$query->the_post();
global $product;
$price = $product->get_regular_price();
$room = $product->get_attribute('pa_kilkist-kimnat');
$area = $product->get_attribute('pa_zagalna-ploshha');
// $total_price = intval($price) * intval($area);
$custom_field_value = get_post_meta($product->get_id(), 'custom_price', true)
?>
<div class="apartments__content-list-container animation-fade-in-up fade-in-up">
<div class="apartments__content-list-item one">
<?php if ($cat_slug == 'kvartyry') { ?>
<a href="<?php the_permalink(); ?>" class="apartments__content-list-item-image">
<img src="<?php the_post_thumbnail_url(); ?>"
alt="preview">
</a>
<?php } else { ?>
<img src="<?php the_post_thumbnail_url(); ?>"
alt="preview">
<?php } ?>
<div class="apartments__content-list-item-info">
<?php if ($cat_slug == 'kvartyry') { ?>
<a href="<?php the_permalink(); ?>"
class="apartments__content-list-item-info-title">
<?php the_title(); ?>
</a>
<?php } else { ?>
<p class="apartments__content-list-item-info-title"><?php the_title(); ?></p>
<?php } ?>
<?php if ($cat_slug == 'kvartyry') { ?>
<div class="apartments__content-list-item-info-price">
<div class="apartments__content-list-item-info-price-sqr">
<div class="apartments__content-list-item-info-price-sqr-name">
площа:
</div>
<div class="apartments__content-list-item-info-price-sqr-value">
<?php echo $area; ?> м<sup>2</sup>
</div>
</div>
<div class="apartments__content-list-item-info-price-name">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none"
xmlns="https://www.w3.org/2000/svg">
<path d="M11.0008 0.5C13.7857 0.5 16.4566 1.60633 18.4259 3.5756C20.3952 5.54487 21.5015 8.21578 21.5015 11.0007C21.5015 13.7857 20.3952 16.4566 18.4259 18.4259C16.4566 20.3952 13.7857 21.5015 11.0008 21.5015C8.21578 21.5015 5.54487 20.3952 3.5756 18.4259C1.60633 16.4566 0.5 13.7857 0.5 11.0007C0.5 8.21578 1.60633 5.54487 3.5756 3.5756C5.54487 1.60633 8.21578 0.5 11.0008 0.5ZM12.5758 6.947C13.3558 6.947 13.9887 6.4055 13.9887 5.603C13.9887 4.8005 13.3542 4.259 12.5758 4.259C11.7957 4.259 11.1657 4.8005 11.1657 5.603C11.1657 6.4055 11.7957 6.947 12.5758 6.947ZM12.8502 15.3875C12.8502 15.227 12.9057 14.81 12.8742 14.573L11.6413 15.992C11.3863 16.2605 11.0667 16.4465 10.9167 16.397C10.8487 16.372 10.7918 16.3234 10.7564 16.2602C10.7209 16.197 10.7091 16.1231 10.7233 16.052L12.7782 9.56C12.9462 8.7365 12.4843 7.985 11.5048 7.889C10.4713 7.889 8.95025 8.9375 8.02475 10.268C8.02475 10.427 7.99475 10.823 8.02625 11.06L9.25775 9.6395C9.51275 9.374 9.80975 9.1865 9.95975 9.2375C10.0337 9.26402 10.0942 9.31847 10.1284 9.38914C10.1626 9.45981 10.1678 9.54108 10.1427 9.6155L8.10575 16.076C7.87025 16.832 8.31575 17.573 9.39575 17.741C10.9858 17.741 11.9248 16.718 12.8517 15.3875H12.8502Z"
fill="#394553"></path>
</svg>
<span>Ц?на за м<sup>2</sup></span>
</div>
<div class="apartments__content-list-item-info-price-value">
<?php if (!empty($custom_field_value)) { ?>
в?д <?php echo formatPrice($custom_field_value * $value_currency); ?>?
<?php } ?>
</div>
<div class="apartments__content-list-item-info-price-name">
<span>Ц?на за м<sup>2</sup></span>
</div>
<div class="apartments__content-list-item-info-price-value">
<?php if (!empty($custom_field_value)) { ?>
в?д <?php echo formatPrice($custom_field_value); ?>$
<?php } ?>
</div>
</div>
<div class="apartments__content-list-item-info-price">
<div class="apartments__content-list-item-info-price-sqr">
<div class="apartments__content-list-item-info-price-sqr-name">
к?мнат:
</div>
<div class="apartments__content-list-item-info-price-sqr-value">
<?php echo $room; ?>
</div>
</div>
<div class="apartments__content-list-item-info-price-name">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none"
xmlns="https://www.w3.org/2000/svg">
<path d="M11.0008 0.5C13.7857 0.5 16.4566 1.60633 18.4259 3.5756C20.3952 5.54487 21.5015 8.21578 21.5015 11.0007C21.5015 13.7857 20.3952 16.4566 18.4259 18.4259C16.4566 20.3952 13.7857 21.5015 11.0008 21.5015C8.21578 21.5015 5.54487 20.3952 3.5756 18.4259C1.60633 16.4566 0.5 13.7857 0.5 11.0007C0.5 8.21578 1.60633 5.54487 3.5756 3.5756C5.54487 1.60633 8.21578 0.5 11.0008 0.5ZM12.5758 6.947C13.3558 6.947 13.9887 6.4055 13.9887 5.603C13.9887 4.8005 13.3542 4.259 12.5758 4.259C11.7957 4.259 11.1657 4.8005 11.1657 5.603C11.1657 6.4055 11.7957 6.947 12.5758 6.947ZM12.8502 15.3875C12.8502 15.227 12.9057 14.81 12.8742 14.573L11.6413 15.992C11.3863 16.2605 11.0667 16.4465 10.9167 16.397C10.8487 16.372 10.7918 16.3234 10.7564 16.2602C10.7209 16.197 10.7091 16.1231 10.7233 16.052L12.7782 9.56C12.9462 8.7365 12.4843 7.985 11.5048 7.889C10.4713 7.889 8.95025 8.9375 8.02475 10.268C8.02475 10.427 7.99475 10.823 8.02625 11.06L9.25775 9.6395C9.51275 9.374 9.80975 9.1865 9.95975 9.2375C10.0337 9.26402 10.0942 9.31847 10.1284 9.38914C10.1626 9.45981 10.1678 9.54108 10.1427 9.6155L8.10575 16.076C7.87025 16.832 8.31575 17.573 9.39575 17.741C10.9858 17.741 11.9248 16.718 12.8517 15.3875H12.8502Z"
fill="#394553"></path>
</svg>
<span>Ц?на за <?php echo $area; ?> м<sup>2</sup></span>
</div>
<div class="apartments__content-list-item-info-price-value">
в?д <?php echo formatPrice($price * $value_currency); ?>?
</div>
<div class="apartments__content-list-item-info-price-name">
<span>Ц?на за <?php echo $area; ?> м<sup>2</sup></span>
</div>
<div class="apartments__content-list-item-info-price-value">
в?д <?php echo formatPrice($price); ?>$
</div>
</div>
<a href="<?php the_permalink() ?>"
class="apartments__content-list-item-info-btn main-btn-blue">
д?знатись б?льше
<svg width="10" height="10" viewBox="0 0 10 10" fill="none"
xmlns="https://www.w3.org/2000/svg">
<path d="M0.574219 9.91367L8.99089 1.51367L8.99089 9.257L9.82422 9.257L9.82422 0.090332L0.657552 0.0903328L0.657552 0.923666L8.40172 0.923666L0.000885818 9.34033L0.574219 9.91367Z"
fill="white"/>
</svg>
</a>
<?php } else {
$price_from = get_field('price_from');
$price_to = get_field('price_to');
$area_from = get_field('area_from');
$area_to = get_field('area_to');
?>
<div class="apartments__content-list-item-info-price">
<?php if (!empty($price_from)) { ?>
<div class="apartments__content-list-item-info-price-name">
<span>Ц?на в?д</span>
</div>
<div class="apartments__content-list-item-info-price-value">
<?php echo $price_from; ?>$
</div>
<?php } ?>
<?php if (!empty($area_from)) { ?>
<div class="apartments__content-list-item-info-price-name">
<span>Площа в?д</span>
</div>
<div class="apartments__content-list-item-info-price-value">
<?php echo $area_from; ?>м<sup>2</sup>
</div>
<?php } ?>
</div>
<div class="apartments__content-list-item-info-price">
<?php if (!empty($price_to)) { ?>
<div class="apartments__content-list-item-info-price-name">
<span>Ц?на до</span>
</div>
<div class="apartments__content-list-item-info-price-value">
<?php echo $price_to; ?>$
</div>
<?php } ?>
<?php if (!empty($area_to)) { ?>
<div class="apartments__content-list-item-info-price-name">
<span>Площа до</span>
</div>
<div class="apartments__content-list-item-info-price-value">
<?php echo $area_to; ?> м<sup>2</sup>
</div>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
</div>
<?php }
wp_reset_query();
?>
</div>
<button id="load_more" class="apartments__content-show-more-btn load-more-btn">Показати ще
</button>
<div class="apartments__content-pagination pagination animation-fade-in-up">
<?php woocommerce_pagination(); ?>
</div>
</div>
</div>
</section>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.