• Resolved morktron

    (@morktron)


    Hi, firstly – thanks for creating this plugin, I can see it will be very handy! πŸ™‚

    I’ve using Types – Views to make a site. I’m trying to make some shortcode to display the taxonomy image. So far I have:

    //Custom shortcode to add taxonomy image to Views
    add_shortcode('service_image', 'service_image_func');
    function service_image_func() {
      $image = gtaxi_get_taxonomy_image(array('size' => 'thumbnail') );
      echo $image;
    }

    Then I use [service_image] as the shortcode – but it is not working. Maybe the code doesn’t know it’s in a ‘services’ taxonomy loop? I hope you can help, thanks

    https://ww.wp.xz.cn/plugins/genesis-taxonomy-images/

Viewing 1 replies (of 1 total)
  • Thread Starter morktron

    (@morktron)

    It works now, silly me – I should have used ‘return’ and not ‘echo’, all good πŸ™‚

Viewing 1 replies (of 1 total)

The topic ‘how to add via shortcode?…’ is closed to new replies.