WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Types – Custom Fields and Custom Post Types Management] How to link image to large image (n

[Plugin: Types – Custom Fields and Custom Post Types Management] How to link image to large image (n

  • eaglejohn

    @danielbenjamins

    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?

    http://wordpress.org/extend/plugins/types/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Amir Helzer

    @amirhelzer

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

    eaglejohn

    @danielbenjamins

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

    eaglejohn

    @danielbenjamins

    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.

    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.

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Types – Custom Fields and Custom Post Types Management] How to link image to large image (n’ is closed to new replies.