Home Forums ACF PRO Before Pseudo Elements


Before Pseudo Elements

  • Hey guys,

    I use ACF Pro and I must get the image url from my custom field to the :before pseudo-element of my diferent divs.

    Is this possible?

  • You need to get the value of your field and create CSS for it.

      #my-element:before {
        background-image: url(<?php the_field('image-field-name-that-returns-url'); ?>);
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.