su_image_carousel support for custom taxonomy
-
I’m using Media Library Assistant for custom taxonomy and it works for su_carousel but not for su_image_carousel.
HTML:
[su_image_carousel source=”taxonomy: attachment_category/89″ columns=”2″ link=”lightbox”]
functions.php
add_filter( ‘su/get_gallery_slides_query’, function( $query, $source, $args ) {
// Replace ‘media_category’ with your taxonomy name
if ( ‘attachment_category’ === $source[‘tax’] ) {
$query[‘post_mime_type’] = ‘image/jpeg,image/gif,image/jpg,image/png’;
$query[‘post_type’] = ‘attachment’;
$query[‘post_status’] = ‘inherit’;
}return $query;
} );
(also tried “attachment_category/89”)
Website result:
ArgumentCountError thrown
Too few arguments to function {closure}(), 1 passed in C:\wamp64\www\wp-includes\class-wp-hook.php on line 288 and exactly 3 expected
- The topic ‘su_image_carousel support for custom taxonomy’ is closed to new replies.