Toolset Types
[Plugin: Types - Custom Fields and Custom Post Types Management] How to link image to large image (n (6 posts)

  1. eaglejohn
    Posted 4 years ago #

    Right now I use this code to link a thumbnail to the "full" sized image:

    <a href="<?php echo(types_render_field("imagefield", array("raw"=>"true"))); ?>"><?php echo(types_render_field("imagefield", array("size"=>"thumbnail"))); ?></a>

    How do I get it linked to the "large" sized image?


  2. Amir Helzer
    Plugin Author

    Posted 4 years ago #

    Have you tried adding the size attribute to the first types_render_field?

  3. eaglejohn
    Posted 4 years ago #

    I'm not sure if I understand you right, can you give me an example based on the code in my first post?

  4. eaglejohn
    Posted 4 years ago #

    Do you mean like this?

    <a href="<?php echo(types_render_field("imagefield", array("raw"=>"true","size"=>"large"))); ?>"><?php echo(types_render_field("imagefield", array("size"=>"thumbnail"))); ?></a>

    I just tried and it doesn't work for me.

  5. upadeshs
    Posted 3 years ago #

    Size attribute did not worked for me. I am using Type 1.0.4 with WordPress 3.4.2.
    Can you help me how to do this?

    I am using <?php echo(types_render_field("screenshot", array("title"=>"Screenshot image/s","width"=>"50","height"=>"30","proportional"=>"true"))); ?> in my template file.

  6. Srdjan
    Posted 3 years ago #

    Don't use raw parameter as true if you want resized images.
    It will always return DB stored value.

    Is it remote image?

    Check out our new version - it has improved image handling.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Toolset Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic