Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/geniouskin/wp-content/themes/ixlab/tmpl/project/ |
Upload File : |
<?php
/**
* The template for displaying filter
*/
defined( 'ABSPATH' ) or die();
if ( is_tax( 'nproject-category' ) || is_tax( 'nproject-tag' ) ) {
return;
}
$classes = array( 'projects-filter' );
$classes[] = sprintf( 'projects-filter-%s', ixlab_option( 'projects__filterableAlign' ) );
/**
* Ignore fetching project terms when archive filter is
* disabled
*/
if ( ixlab_option( 'projects__filterable' ) == 'on' ):
$terms = array();
$filter_type = ixlab_option( 'projects__filterableType' );
while ( have_posts() ) {
the_post();
if ( $_terms = get_the_terms( get_the_ID(), $filter_type ) ) {
foreach ( $_terms as $term ) {
$terms[ $term->term_id ] = $term;
}
}
}
rewind_posts();
?>
<?php if ( ! empty( $terms ) ): ?>
<div class="<?php echo esc_attr( join( ' ', $classes ) ) ?>">
<ul data-filter-target=".content-inner[data-grid]">
<li data-filter="*" class="active">
<a href="javascript:;">
<?php esc_html_e( 'Show All', 'ixlab' ) ?>
</a>
</li>
<?php foreach ( $terms as $id => $term ): ?>
<li data-filter="<?php printf( '.%s-%s', esc_attr( $filter_type ), esc_attr( $term->slug ) ) ?>">
<a href="<?php echo esc_url( get_term_link( $term ) ) ?>">
<?php if ( $preview_id = get_field( 'thumbnail', "nproject-category_{$term->term_id}" ) ): ?>
<?php echo wp_get_attachment_image( $preview_id, 'full' ); ?>
<?php endif ?>
<span><?php echo esc_html( $term->name ) ?></span>
</a>
</li>
<?php endforeach ?>
</ul>
</div>
<?php endif ?>
<?php endif ?>