File: /home/frenchy/refonte2023/wordpress/wp-content/plugins/ova-sev/templates/archive-sev.php
<?php if ( !defined( 'ABSPATH' ) ) exit();
get_header();
global $wp_query;
$number_column = get_theme_mod( 'ova_sev_layout', 'three_columns' );
$cate_slug = get_query_var('cat_sev') ? get_query_var('cat_sev') : 'all';
$post_per_page = get_theme_mod( 'ova_sev_total_record', 9 );
$order_by = get_theme_mod( 'ova_sev_orderby', 'ID' );
$order = get_theme_mod( 'ova_sev_order', 'DESC' );
$args = array(
'order_by' => $order_by,
'order' => $order,
'posts_per_page' => $post_per_page,
'cate' => $cate_slug,
);
?>
<div class="row_site">
<div class="container_site">
<div class="ova-sev-archive <?php echo esc_attr( $number_column ); ?>">
<form id="ova-sev-filter" class="ova-sev-filter" method="POST" autocomplete="off">
<div class="wrapper">
<div class="sev-name">
<input type="text" name="ovasev_name" aria-label="<?php esc_attr_e( 'Service Name', 'ova-sev' ); ?>" id="ovasev_name" placeholder="Name">
</div>
<div class="ovasev_cat_search">
<label for="ovasev_category" class="visuallyhidden"><?php esc_html_e( 'Categories', 'ova-sev' ); ?></label>
<?php $ovadoc_cat_dropdown = apply_filters( 'ovasev_cat_dropdown', $cate_slug ); ?>
<i class="arrow_carrot-down" aria-hidden="true"></i>
</div>
<div class="wrap-ovasev_submit">
<button type="submit" class="ovasev_submit" aria-label="<?php esc_attr_e( 'Search Service', 'ova-sev' ); ?>"><?php esc_html_e( 'Search', 'ova-sev' ); ?></button>
</div>
</div>
</form>
<div class="ova-sev-loader">
<div class="loader" aria-hidden="true"></div>
</div>
<div class="content_inner">
<?php if ( have_posts() ) : ?>
<div class="wrapper">
<?php while ( have_posts() ) : the_post(); ?>
<?php
$id = get_the_ID();
$image_src = \Elementor\Utils::get_placeholder_image_src();
$image_alt = get_the_title();
$class_icon = get_post_meta( $id, 'ova_sev_met_class_icon', true );
?>
<div class="item">
<?php
if ( has_post_thumbnail( $id ) ) {
$image_id = get_post_thumbnail_id( $id );
$image_src = get_the_post_thumbnail_url( $id, 'ova_sev_thumbnail' );
if ( get_post_meta( $image_id, '_wp_attachment_image_alt', true) ) {
$image_alt = get_post_meta( $image_id, '_wp_attachment_image_alt', true);
} else {
$image_alt = get_the_title( $image_id );
}
}
?>
<div class="image">
<img src="<?php echo esc_url( $image_src ); ?>" alt="<?php echo esc_attr( $image_alt ); ?>">
</div>
<div class="content">
<div class="content-wrap">
<?php if(!empty($class_icon)) { ?>
<div class="icon">
<i class="<?php echo esc_attr( $class_icon ); ?>" aria-hidden="true"></i>
</div>
<?php } ?>
<div class="info">
<a href="<?php the_permalink(); ?>">
<h3 class="title"><?php echo esc_html( get_the_title() ); ?></h3>
</a>
<div class="info-hidden">
<p class="desc"><?php echo esc_html( ova_sev_custom_text( get_the_excerpt(), 12 ) ); ?></p>
<a href="<?php the_permalink(); ?>"
title="<?php esc_attr_e( 'View Service', 'ova-sev' ); ?>" class="link">
<span class="text"><?php esc_html_e( 'View Service', 'ova-sev' ); ?></span>
<i class="gimonticon gimonticon-right" aria-hidden="true"></i>
</a>
</div>
</div>
</div>
</div>
</div>
<?php endwhile;?>
</div>
<?php else: ?>
<p><?php esc_attr_e( 'No result is found !!!', 'ova-sev' ); ?></p>
<?php endif;wp_reset_postdata();
$total_pages = $wp_query->max_num_pages;
$curent_page = 1;
ob_start();
ova_sev_pagination_ajax($total_pages,$curent_page,$post_per_page,$args);
echo ob_get_clean();
?>
</div>
</div>
</div>
</div>
<?php
get_footer();