'faq_cat',
'child_of' => $term_id,
'orderby' => isset( $porto_settings['faq-cat-orderby'] ) ? $porto_settings['faq-cat-orderby'] : 'name',
'order' => isset( $porto_settings['faq-cat-order'] ) ? $porto_settings['faq-cat-order'] : 'asc',
)
);
foreach ( $taxs as $tax ) {
$faq_taxs[ urldecode( $tax->slug ) ] = $tax->name;
}
if ( ! $faq_infinite ) {
global $wp_query;
$posts_faq_taxs = array();
if ( is_array( $wp_query->posts ) && ! empty( $wp_query->posts ) ) {
foreach ( $wp_query->posts as $post ) {
$post_taxs = wp_get_post_terms( $post->ID, 'faq_cat', array( 'fields' => 'all' ) );
if ( is_array( $post_taxs ) && ! empty( $post_taxs ) ) {
foreach ( $post_taxs as $post_tax ) {
$posts_faq_taxs[ urldecode( $post_tax->slug ) ] = $post_tax->name;
}
}
}
}
foreach ( $faq_taxs as $key => $value ) {
if ( ! isset( $posts_faq_taxs[ $key ] ) ) {
unset( $faq_taxs[ $key ] );
}
}
}
// Show Filters
if ( is_array( $faq_taxs ) && ! empty( $faq_taxs ) ) :
?>