WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
How to link image to large image (n (6 posts)

  1. eaglejohn
    Member
    Posted 2 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?

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

  2. AmirHelzer
    Member
    Plugin Author

    Posted 2 years ago #

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

  3. eaglejohn
    Member
    Posted 2 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
    Member
    Posted 2 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
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year 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

About this Topic

Tags