File: /var/www/vhosts/byildiz.com.tr/httpdocs/wp-content/themes/lumex/template-parts/content-services.php
<?php
/**
* Template part for displaying posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package lumex
*/
?>
<?php
//taxonomy
$current_categories = get_the_terms( get_the_ID(), 'services_categories' );
$categories = [];
if ( $current_categories && ! is_wp_error( $current_categories ) ) {
foreach ( $current_categories as $key => $value ) {
$categories[] = $value->name;
}
}
$cat_string = implode( ',', $categories );
//content
$image = get_the_post_thumbnail_url( get_the_ID(), 'lumex_1920xAuto' );
$list = get_field( 'list' );
$short = get_field( 'short' );
//vars
$index = get_query_var( 'index' );
$carousel = get_query_var( 'carousel' );
$layout = get_query_var( 'layout' );
$columns = get_query_var( 'columns' );
$angle = get_query_var( 'angle' );
$angle_grey = get_query_var( 'angle_grey' );
$item_classes = 'mil-large-card';
if ( $columns === '3' ) {
$col_classes = 'col-md-6 col-xl-4';
} elseif ( $columns === '2' ) {
$col_classes = 'col-12 col-md-6 col-lg-6';
} else {
$col_classes = 'col-12 col-md-12 col-lg-12';
}
?>
<div class="<?php echo esc_attr( $col_classes ); ?>">
<a href="<?php echo esc_url( get_permalink() ); ?>" class="<?php echo esc_attr( $item_classes ); ?>">
<?php if ( $image ) : ?>
<div class="mil-card-head<?php if ( $angle === 'yes' ) : ?> mil-angle<?php endif; ?><?php if ( $angle_grey === 'yes' ) : ?> mil-angle-gray<?php endif; ?>">
<img src="<?php echo esc_url( $image ); ?>" alt="<?php echo esc_attr( get_the_title() ); ?>">
<div class="mil-plus">
<i class="fal fa-plus"></i>
</div>
</div>
<?php endif; ?>
<div class="mil-card mil-w-100 mil-md-tal mil-mb-2">
<h4 class="mil-mb-4 mil-c-m-1 mil-w-80"><?php the_title(); ?></h4>
<?php if ( $short ) : ?>
<p class="mil-t-14 mil-c-m-3 mil-mb-4 mil-3-row-max">
<?php echo wp_kses_post( $short ); ?>
</p>
<?php endif; ?>
<div class="mil-divider mil-w-100 mil-mb-3"></div>
<?php if ( $list ) : ?>
<ul class="mil-check-list">
<?php foreach ( $list as $item ) : ?>
<?php if ( ! empty( $item['value'] ) ) : ?>
<li><?php echo wp_kses_post( $item['value'] ); ?></li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
</a>
</div>