HEX
Server: LiteSpeed
System: Linux standart103.isimtescil.net 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: byildiz (11197)
PHP: 8.2.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/byildiz.com.tr/httpdocs/wp-content/themes/lumex/template-parts/content.php
<?php
/**
 * Template part for displaying posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package lumex
 */

?>

<?php

//options
$blog_categories = get_field( 'blog_categories', 'option' );

//vars
$row_layout = get_query_var( 'row_layout' );
$items_per_row = get_query_var( 'items_per_row' );
$show_excerpt = get_query_var( 'show_excerpt' );

if ( $row_layout == 'list' ) {
	$items_per_row = '1';
}

//content
if ( $items_per_row == '2' || $items_per_row == '3' || $items_per_row == '4' ) {
	$image = get_the_post_thumbnail_url( get_the_ID(), 'lumex_950xAuto' );
} else {
	$image = get_the_post_thumbnail_url( get_the_ID(), 'lumex_1920xAuto' );
}

//categories
$categories_list = false;
if ( $blog_categories ) {
	$categories_list = get_the_category( get_the_ID() );
}

//column class names
$col_class = '';

if ( $items_per_row == '3' ) {
	$col_class = 'col-12 col-md-6 col-lg-4';
} elseif ( $items_per_row == '2' ) {
	$col_class = 'col-12 col-md-6 col-lg-6';
} else {
	$col_class = 'col-lg-12';
}

if ( $row_layout == 'grid' ) {
	$item_class = 'mil-item-card mil-port-ori mil-angle mil-angle-gray mil-mb-2';
} else {
	$item_class = 'mil-item-card mil-port-ori mil-angle mil-mb-2';
}

$post_class_prefix = 'post';

?>

<div class="<?php echo esc_attr( $col_class ); ?>">
	<div id="<?php echo esc_attr( $post_class_prefix ); ?>-<?php the_ID(); ?>" <?php post_class( $item_class ); ?>>
		<div class="row g-0 mil-w-100">
			<div class="col-12">
				<div class="mil-cover<?php if ( ! $image ) : ?> mil-cover-noimg<?php endif; ?>">
					<?php if ( $image ) : ?>
					<a href="<?php echo esc_url( get_permalink() ); ?>">
						<img src="<?php echo esc_url( $image ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>">
					</a>
					<?php endif; ?>
				</div>
				<div class="mil-badges">
					<?php if ( $categories_list ) : foreach ( $categories_list as $index => $category ) : ?>
					<div class="mil-category"><?php echo esc_html( $category->cat_name ); ?></div>
					<?php endforeach; endif; ?>
				</div>
			</div>
			<div class="col-12">
				<div class="mil-descr">
					<div class="mil-text-row">
						<h4 class="mil-mb-2"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php the_title(); ?></a></h4>
						<div class="mil-text mil-mb-3">
							<div class="mil-t-16 mil-c-m-2"><?php the_excerpt(); ?></div>
						</div>
						<a href="<?php echo esc_url( get_permalink() ); ?>" class="mil-btn mil-soft">
							<span><?php echo esc_html__( 'Read more', 'lumex' ); ?></span>
							<i class="fa fa-arrow-right"></i>
						</a>
					</div>
					<div class="mil-info">
						<ul>
							<li>
								<div class="mil-author mil-mr-2 mil-sm-mr-1">
									<img src="<?php echo esc_url( get_avatar_url( get_the_author_meta('ID') ) ); ?>" alt="<?php echo esc_attr( get_the_author_meta('display_name') ); ?>" />
								</div>
								<p><?php the_author(); ?></p>
							</li>
							<li>
								<span class="mil-icon-2 mil-mr-2 mil-sm-mr-1">
									<i class="fal fa-calendar"></i>
								</span>
								<p>
									<span class="mil-date">
										<?php if ( get_the_title() == '' ) : ?>
										<a href="<?php echo esc_url( get_permalink() ); ?>" class="mil-date-link">
										<?php endif; ?>
											<?php echo esc_html( get_the_date() ); ?>
										<?php if ( get_the_title() == '' ) : ?>
										</a>
										<?php endif; ?>
									</span>
								</p>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>