| Server IP : 213.186.33.4 / Your IP : 216.73.216.222 Web Server : Apache System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : karinebmkh ( 644538) PHP Version : 8.4.22 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/karinebmkh/www2/wp-content/themes/glaza/templates/layouts/ |
Upload File : |
<?php
/**
* @param array $settings
* widget post
*/
if ( ! function_exists( 'glaza_widget_post' ) ) :
function glaza_widget_post( $settings = array() ) {
if ( empty( $settings['style'] ) ) {
$settings['style'] = 1;
}
$settings['class_name'] = 'widget-post';
$settings['no_found_rows'] = true;
$settings['block_name'] = 'widget_post';
$query_data = glaza_query_custom( $settings );
if ( $query_data->have_posts() ) {
glaza_block_content_open();
switch ( $settings['style'] ) {
case 1:
glaza_widget_post_listing_1( $settings, $query_data );
break;
case 2:
glaza_widget_post_listing_2( $settings, $query_data );
break;
}
glaza_block_content_close();
wp_reset_postdata();
}
}
endif;
if ( ! function_exists( 'glaza_widget_post_listing_1' ) ) :
function glaza_widget_post_listing_1( $settings = array(), $query_data ) {
if ( method_exists( $query_data, 'have_posts' ) ) : ?>
<div class="post-style-1">
<?php while ( $query_data->have_posts() ) :
$query_data->the_post();
glaza_post_list_3( $settings, $query_data );
endwhile; ?>
</div>
<?php endif;
}
endif;
if ( ! function_exists( 'glaza_widget_post_listing_2' ) ) :
function glaza_widget_post_listing_2( $settings = array(), $query_data ) {
if ( method_exists( $query_data, 'have_posts' ) ) : ?>
<div class="post-style-2">
<?php while ( $query_data->have_posts() ) :
$query_data->the_post();
glaza_post_grid_3( $settings, $query_data );
endwhile; ?>
</div>
<?php endif;
}
endif;