Forums

ALO EasyMail Newsletter
[resolved] How to set the thumbnail size in a site template? (4 posts)

  1. Agnes
    Member
    Posted 1 year ago #

    I have made a custom newsletter templaet and am now transfering it into a site template ingle-newsletetr.html I could use for preview.
    So I am areplacing all PLACEHOLDERS with their PHP equivbalents.
    There is one thing I dont know though: the edit give option to place the featured image thumbnail in several dimensions.
    I am not sure how this information is stored (I dont find in postmetas?) so how could I replicate it in PHP in my template?
    Thanks
    Agnes

    http://wordpress.org/extend/plugins/alo-easymail/

  2. Agnes
    Member
    Posted 1 year ago #

    Oh, I found in post meta
    _placeholder_newsletter_imgsize and alike

  3. mbtocalli
    Member
    Posted 10 months ago #

    I'm using [THUMB] to show the thumbnail of the featured image in the newsletter. What PHP code do I have to use to show a hardcoded specific image dimension?

  4. wondercore
    Member
    Posted 6 months ago #

    use:

    <?php
    if ( has_post_thumbnail()) {
    $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($newsletter->ID), 'large');
    //print_r($large_image_url);
    $link_img = $large_image_url[0];
    //print_r ($link_img);
    }
    ?>
    
    <img src="<?php print_r($link_img); ?>" alt="image" />

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic