Support

Account

Home Forums Feature Requests Change post thumbnail and post header picture with ACF

Unread

Change post thumbnail and post header picture with ACF

  • I’d like to edit my single.php to auto change the post thumbnail and the header cover picture of my post by selecting it with an ACF field. I’d like to have 4 different options for this field. For example, my-custom-field > Option1 set min-option1.jpg as thumbnail and head-option1.jpg as header cover.

    My single.php already include these lines of code :

    <?php
    $couv = get_field( “photo_couverture” );

    if(empty($couv)){
    $couv = get_the_post_thumbnail_url();
    }
    ?>
    It might be simple but i don’t understand php… :'(

    If you have a bit of time to help me it would be wonderful!!! Thanks a lot!

Viewing 1 post (of 1 total)

The topic ‘Change post thumbnail and post header picture with ACF’ is closed to new replies.