HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/dodolodge-net/wp-content/themes/hotel-wp/inc/widgets/posts/tpl/style-5.php
<?php
/**
 * Template for displaying default element.
 *
 *
 * @author      ThimPress
 * @package     Thim_Builder/Templates
 * @version     1.0.0
 * @author      Thimpress, tuanta
 */

$posts_args = array(
	'posts_per_page'      => $instance['post_limit'],
	'ignore_sticky_posts' => 1,
	'cat'                 => $instance['cat_id']
);
$readmore_text = '';
if ( $instance['readmore_text'] != '' ) {
	$readmore_text = $instance['readmore_text'];
} else {
	$readmore_text = esc_html__( 'Read More', 'hotel-wp' );
}
$readmore_css = '';
if ( $instance['readmore_color'] ) {
	$readmore_css .= 'color: ' . $instance['readmore_color'] . ';';
}
if ( $readmore_css ) {
	$readmore_css = 'style="' . $readmore_css . '"';
}
$post_column = !empty($instance['post_column']) ? $instance['post_column'] : '3';
$query = new WP_Query( $posts_args );
if ($query->have_posts()) {
    echo '<div class="tp-list-posts-wrapper">';
   
    echo '<div class="tp-list-posts'. ' ' . $instance['style'] .'" data-number="'. esc_attr($post_column) .'">';
    while ($query->have_posts()) {
        $query->the_post();
        global $post;
        $thim_info = get_post_meta( $post->ID, 'thim_info', true );
       
    ?>
        <div class="post-item">
            <div class="thumb">
                <?php the_post_thumbnail(array(740, 540)); ?>
                <div class="tp-post-info">
                    <h4 class="post-title"><a href="<?php echo esc_url(get_the_permalink()); ?>"><?php echo get_the_title(); ?></a></h4>
                    <?php
                        if ( $instance['info_button'] == true || $instance['info_button'] == 'yes') {
                            if ( $thim_info ) {
                    ?>            
                            <div class="entry-info" ><?php echo esc_html($thim_info)?></div>
                    <?php            
                            }
                        }
                    ?>
                    <?php
                        if ( $instance['post_button'] == false ) {
                            echo '<div class="readmore" > ';
                            echo '<a href = "' . esc_url( get_permalink() ) . '" ' . $readmore_css . ' >' . $readmore_text . ' </a> ';
                            echo '</div>';
                        }
                    ?>
                </div>
            </div>
        </div>
    <?php
    }
    wp_reset_postdata();
    
    echo '</div></div>';
    
}