File: /var/www/html/onlineshop/wp-content/plugins/meta-box/js/wysiwyg.js
<?php
/**
* Template part for displaying front page imtroduction.
*
* @package Moral
*/
// Get the content type.
$portfolio = get_theme_mod( 'lawman_education_portfolio', 'cat' );
// Bail if the section is disabled.
if ( 'disable' === $portfolio ) {
return;
}
?>
<div id="portfolio" class="page-section">
<div class="section-header">
<h2 class="section-title">
<?php echo esc_html( get_theme_mod( 'lawman_education_portfolio_title', __( 'We fight for your right', 'lawman-education' ) ) ) ; ?>
</h2>
</div><!-- .section-header -->
<div class="section-content col-4">
<nav class="portfolio-filter">
<ul class="nav-tabs clear">
<li class="active"><a href="#" data-filter="*"><?php esc_html_e('All', 'lawman-education')?></a></li>
<?php $cats = [];
for ($i=1; $i <= 4; $i++) {
if(!empty(get_theme_mod('lawman_education_portfolio_cat_'.$i))){
$cats[] = get_theme_mod('lawman_education_portfolio_cat_'.$i);
$cat = get_category(get_theme_mod('lawman_education_portfolio_cat_'.$i));
echo '<li><a href="#" data-filter=".'.$cat->slug.'">'.$cat->name.'</a></li>';
}
}?>
</ul><!-- .nav-tabs -->
</nav>
<div class="grid gallery-popup">
<?php
$query = new WP_Query( array(
'category__in' => $cats,
'ignore_sticky_posts' => true,
'posts_per_page' => 8,
) );
if ( $query->have_posts() ) {
while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="grid-item <?php echo lawman_education_get_category_slug_list( get_the_ID() ); ?> hentry">
<a href="<?php echo esc_url( get_the_post_thumbnail_url() ); ?>" class="popup">
<div class="featured-image" style="background-image: url('<?php the_post_thumbnail_url('medium_large'); ?>')">
<div class="gallery-item-wrapper">
<?php $cat = get_the_category(); echo '<span>'.$cat[0]->name.'</span>';?>
<h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
</div>
</div><!-- .featured-image -->
</a>
</div><!-- .grid-item -->
<?php
endwhile;
wp_reset_postdata();
}
?>
</div><!-- .grid -->
</div><!-- .section-content -->
</div><!-- #portfolio -->