<?php
/**
 * @var $categories
 */
?>

<div class="photo-categories-wrapper">

	<?php if ( $categories ) { ?>

		<div class="owl-carousel js-wpj-photo-categories-carousel">

			<?php foreach ( $categories as $key => $category ) {

				if ( $category->slug != 'business' && $category->slug != 'marketing' && $category->slug != 'online-classes-teaching' && $category->slug != 'other' ) { ?>

					<a href="<?php echo get_category_link( $category->term_id ); ?>" class="wpj-photo-category-slide" style="background-image: url(<?php echo get_template_directory_uri() . '/assets/images/homepage/' . $category->slug . '-photo.webp'; ?>);">

						<div class="bottom-content"><?php echo $category->name; ?></div>

					</a>

				<?php }

			} ?>

		</div>

	<?php } ?>

</div>