Thread Starter
polhf
(@polhf)
would be great to hear from you
Plugin Author
Vova
(@gn_themes)
Thread Starter
polhf
(@polhf)
Hi Vladimir,
i have readed the following article and i added the code in my theme. But it still not running.
Plugin Author
Vova
(@gn_themes)
Hi @polhf,
have you changed the taxonomy name in the snippet? Please post here your code.
add_filter( 'su/get_gallery_slides_query', function( $query, $source, $args ) {
// Replace 'media_category' with your taxonomy name
if ( 'media_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;
}, 10, 3 );
Thread Starter
polhf
(@polhf)
hi
in Setting>Media
Custom taxonomy slug : media_category
add_filter( 'su/get_gallery_slides_query', function( $query, $source, $args ) {
if ( 'media_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;
}, 10, 3 );
Plugin Author
Vova
(@gn_themes)
Hi @polhf,
but your shortcode from the first post is using category as media taxonomy:
[su_image_carousel source="taxonomy: category/38"]
Try changing it to:
[su_image_carousel source="taxonomy: media_category/38"]
Thread Starter
polhf
(@polhf)
sorry i spelled it wrong
screenshots:
Code in Theme
Code in theme
Post with shortcode
post with shortcode
Media setting
media setting
post
-
This reply was modified 6 years, 1 month ago by
polhf.
Plugin Author
Vova
(@gn_themes)
Ok, now let’s make sure you’re using the correct category ID. Open this link in your browser:
https://hoppelburg.de/wp-admin/term.php?taxonomy=media_category&tag_ID=69&post_type=attachment
Is that the category you want to display the images from, OR is there a blank page? Please take a screenshot.