Support

Account

Home Forums Backend Issues (wp-admin) How to make a background image using a image field Reply To: How to make a background image using a image field

  • If You’re new to ACF & PHP – it’s easy.

    Step 1:
    Make ACF field: image and set “Return Format” option to “Image URL”

    Step 2:
    Let’s say You give the Label “My background” -> the (autogenerated) Name will be: my_background so:

    Now You can use it anywhere in post / page:

    <div style="background-image: url(<?php echo get_field('my_background'));">...</div>