WordPress.org

Ready to get started?Download WordPress

Forums

Custom Content Type Manager
Custom field image to show thumbnail with shortcode (2 posts)

  1. hasacitto
    Member
    Posted 1 year ago #

    Hi admin,

    I have issue here with Custom Field summarize shortcode.
    I need to show thumbnail image on my client website. and this's my current shortcode :

    [summarize-posts post_type="product" order="ASC" orderby="post_date"]
    [+product_images:to_image_tag+]
    [/summarize-posts]

    that shortcode will show a huge image (original image) from custom field. I need to show the thumbnail image. I still need the original image to show the lightbox.

    any clue for this issue ? there's no way for client to upload 2 images (original and thumbnail)

    Thanks! :)

    http://wordpress.org/extend/plugins/custom-content-type-manager/

  2. fireproofsocks
    Member
    Plugin Author

    Posted 1 year ago #

    WP has a built-in "featured image" functionality which the GetPostsQuery class supports by offering a "thumbnail_src" placeholder, but that's only available for a post's dedicated featured image, not for any other image field.

    The normal "to_image_tag" filter does not do any sort of image re-sizing (I've tried to do that, but I've had compatibility issues across servers) -- see the feature request here: http://code.google.com/p/wordpress-custom-content-type-manager/issues/detail?id=269

    You could use the to_image_src filter: http://code.google.com/p/wordpress-custom-content-type-manager/wiki/to_image_src_OutputFilter and then resize it using HTML (I know, that's bad form). Otherwise, you should take advantage of the PHP counterpart to the shortcode: http://code.google.com/p/wordpress-custom-content-type-manager/wiki/get_posts In PHP, you could resize the images however you need them.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic