Support

Account

Home Forums Front-end Issues Dynamically add featured image class

Unread

Dynamically add featured image class

  • Hi,

    I’m trying to apply a featured image class and I’m having trouble with my code any help would be much appreciated

    <?php
    $variable = the_field('featured_image_class');
    the_post_thumbnail('thumbnail', array('class' => $variable));
    ?>

    – Rich

Viewing 1 post (of 1 total)

The topic ‘Dynamically add featured image class’ is closed to new replies.