<?php
/**
 * @var $termchildren
 * @var $taxonomy_name
 * @var $enable_slider
 */

if ( isset( $term->term_id ) ) {

	if ( count ( $termchildren ) > 0 ) { ?>

		<div class="<?php if ( $taxonomy_name == 'request_cat' ) echo 'request-subcategories'; else echo 'job-subcategories'; ?> subcategory-listing" <?php if ( $enable_slider ) { echo 'data-slider="1"'; } ?>>

			<?php if ( $enable_slider ) { ?>

				<div class="arrows-wrapper" style="display: none;">
					<a class="category-direction category-direction-left div-disabled">
						<i class="angle left icon"></i>
					</a>

					<a class="category-direction category-direction-right">
						<i class="angle right icon"></i>
					</a>
				</div>

			<?php } ?>

			<ul>

				<?php foreach ( $termchildren as $element ) { ?>

					<li>

						<a href="<?php echo get_term_link( $element, $taxonomy_name ); ?>">

							<?php echo $element->name; ?>

						</a>

					</li>

				<?php } ?>

			</ul>

		</div>

	<?php } else echo '<style>.subcategories-row-wrapper{display:none;}</style>'; // for page builder

} else echo '<style>.subcategories-row-wrapper{display:none;}</style>'; // for page builder