Skip Navigation

[Closed] Taxonomy Image SIZE

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 9 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#242224

I'm trying to add the taxonomy image to archive pages on my site (using the taxonomy image plugin). I'm using this code in functions.php:

add_shortcode('wpv-taxonomy-image', 'taximage');
function taximage($atts) {
  global $WP_Views, $wp_query;
  $term = $WP_Views ->get_current_taxonomy_term();
  $wp_query->queried_object = $term;
  $filtered = apply_filters( 'taxonomy-images-queried-term-image', '' );
  $wp_query->queried_object = wp_reset_query(); // restore the original wp_query
  return $filtered;
}

It works!... but it always uses the thumbnail version of the image. I want to use the "full" size. I tried using the "size" attribute in the shortcode, like this:

[wpv-taxonomy-image size="full"]

, but it isn't recognized. Is there something I can add to the function to achieve this?

#242347

Hi ianM,

Are we talking about the plugin "Taxonomy Images", download from:
https://wordpress.org/plugins/taxonomy-images/

As their document mentioned, you can set custom size, like this,

Replace this line from:
$filtered = apply_filters( 'taxonomy-images-queried-term-image', '' );

To:
$filtered = apply_filters( 'taxonomy-images-queried-term-image', '' , array('image_size' => 'medium') );

The topic ‘[Closed] Taxonomy Image SIZE’ is closed to new replies.