custom_gallery
-
The shortcode custom_gallery supports the taxonomy for all sorts of post_types but not for the attachments.
Situation: Added custom taxonomy on Media, organized the media in categories.
When selecting the taxonomy and taxonomy-entry-id’s in the shortcode settings of custom_gallery the result is:
[su_custom_gallery source=”taxonomy: category_media/270,268″ limit=”34″ link=”lightbox” width=”350″ height=”250″]
This results in no output.
To make it work I have modified tools.php (starting at line 711 …)
the //cvd marks are new /or modified
—————-
$query[‘tax_query’] = array(
array(
‘taxonomy’ => $args[‘source’][‘val’][0],
field’ => ‘id’,
‘terms’ => (array) explode( ‘,’, $args[‘source’][‘val’][1] ),
‘operator’ => ‘AND’ //cvd
)
);
$query[‘post_type’] = ‘any’;
$query[‘post_status’] = ‘any’; //cvd
…
$thumb = ( $args[‘source’][‘type’] === ‘media’ || $post->post_type === ‘attachment’ ) ? //cvd
——————-
The operator AND is clearly something you would like to define while building the shortcode.Could you please see if this can be made part of a next release.
rgrds,
Cees
- The topic ‘custom_gallery’ is closed to new replies.