WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
[resolved] custom thumbnail sizes (1 post)

  1. RRikesh
    Member
    Posted 1 year ago #

    Hello, I'm using the ACF plugin (version 3.4.1) and I'm having troubles setting up custom thumbnail sizes.

    I tried to follow the following example found on the ACF Docs but I'm not getting any result.

    <?php $image = wp_get_attachment_image_src(get_field('image_test'), 'full'); ?>
    <img src="<?php echo $image[0]; ?>" alt="<?php get_the_title(get_field('image_test')) ?>" />

    I have added the following line to my functions.php file
    add_image_size('eff_image', 528, 373, true);

    Then I'm calling it with

    $image = wp_get_attachment_image_src( get_field('illustration'), 'eff_image' ) ;
    print_r($image);

    And I'm not getting anything in the $image variable
    Anything wrong with that?

    Thanks

    http://wordpress.org/extend/plugins/advanced-custom-fields/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.